diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/centralize_logs.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/centralize_logs.md index 2c996d0853..798003596c 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/centralize_logs.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/centralize_logs.md @@ -109,6 +109,59 @@ To configure log rotation and retention, you must patch your Automate configurat After you patch the Automate configuration, Automate saves and rotates the log files in the location specified in `redirect_log_file_path`. +## Configure Rate Limiter + +To configure Rate Limiter, you must patch your Automate configuration. + +1. Create a TOML file with the following content on the node running Chef Automate in a standalone deployment or on the bastion host in an Automate HA cluster: + + ```toml + [global.v1.log] + redirect_sys_log = true + redirect_log_file_path = "" + rate_limit_interval = 600 + rate_limit_burst = 20000 + ``` + + Set the following values: + + - `redirect_sys_log`: Whether to save the system logs to a file. Set to `true` to save to a file. Default value: `false`. + - `redirect_log_file_path`: The path to the directory that you want to save the Automate log to. This value is required if `redirect_sys_log` is `true`. + - `rate_limit_interval`: This defines the time interval for rate-limiting in seconds. For example, if it's set to 600s, rsyslog will track messages within each 600-second window. The default value will be the same as the `rsyslog` default value, which is `600` [rsyslog Page](https://www.rsyslog.com/doc/configuration/modules/imjournal.html#ratelimit-interval). + - `rate_limit_burst`: This sets the maximum number of messages allowed within the interval defined by rate_limit_interval. If more messages are received within the interval, they will be temporarily suppressed to avoid spamming the rsyslog. The default value will be the same as the `rsyslog` default value, which is `20000` [rsyslog Page](https://www.rsyslog.com/doc/configuration/modules/imjournal.html#ratelimit-burst). + + {{< note >}} + + - Changing the `rate_limit_burst` or `rate_limit_interval` value will configure both journald and rsyslog settings as well. + - The default values for RateLimitInterval and RateLimitBurst in `journald` are 30 seconds and 10,000 messages, respectively. + - In `rsyslog`, the default values for RateLimitInterval and RateLimitBurst are 600 seconds and 20,000 messages, respectively. + + {{< /note >}} + + {{< warning >}} + Enabling this configuration may lead to increased disk utilization. + {{< /warning >}} + +1. Patch the Chef Automate configuration. + + To patch a standalone Chef Automate node or Chef Automate HA nodes in a cluster: + + ```bash + sudo chef-automate config patch + ``` + + To patch OpenSearch nodes in Chef Automate HA cluster: + + ```bash + chef-automate config patch --opensearch + ``` + + To patch PostgreSQL nodes in Chef Automate HA cluster: + + ```bash + chef-automate config patch --postgresql + ``` + ## Centralize all node logs to one location You can configure all nodes in a Chef Automate HA cluster to save log files to one log location. diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/chef_automate_license.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/chef_automate_license.md index 53cb46f73f..0a79e1e992 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/chef_automate_license.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/chef_automate_license.md @@ -15,9 +15,15 @@ Before running Chef Automate, you must accept the Chef EULA. Chef Automate offers two license tiers that have different entitlements: -* **Trial:** A trial license is for users or organizations interested in exploring the product before buying. +* **Trial:** A trial license is for users or organizations interested in exploring the product before buying. Generate the license from https://www.chef.io/license-generation-free-trial * **Commercial:** A commercial license is for customers who have purchased and are entitled to use it according to the license terms. +{{< warning >}} + +The Chef Server deployed and running with Automate will also require a license. The Chef Automate license will cover the Chef Server license. + +{{< /warning >}} + Chef Automate is built around a web user interface that provides visibility into all aspects of your infrastructure. The licensing types will affect your UI journey. For more information on Chef licenses, see [Chef licensing documentation](https://docs.chef.io/licensing/). @@ -104,3 +110,10 @@ You cannot use Chef Automate features and capabilities. To continue using Chef A 1. [Contact us](https://www.chef.io/contact-us) to get a license. 1. If you already have a license key, paste it in the popup box and check the I agree to the Terms and Service box. 1. Select **Apply License**. + +## Chef Server under Automate License + +Chef Server, when deployed with Automat,e will abide by the Automate license. + +The `chef-server-ctl` command will not work if the commercial/trial license has not been applied to Automate or has expired. In the case of `knife` or `Infra Client` execution, the Chef Server will not respond if the Automate license has not been applied or expired. + \ No newline at end of file diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/chef_infra_in_chef_automate.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/chef_infra_in_chef_automate.md index 65ada718a1..b5ea4489be 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/chef_infra_in_chef_automate.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/chef_infra_in_chef_automate.md @@ -52,6 +52,7 @@ The list of parameters are as follows: | opscode_erchef['reindex_sleep_min_ms'] | 500 | 500 | ```[erchef.v1.sys.index]```
```reindex_sleep_min_ms=500``` | | opscode_erchef['reindex_sleep_max_ms'] | 2000 | 2000 | ```[erchef.v1.sys.index]```
```reindex_sleep_max_ms=2000``` | | opscode_erchef['reindex_item_retries'] | 3 | 3 | ```[erchef.v1.sys.index]```
```reindex_item_retries=3``` | +| opscode_erchef['track_total_hits'] | FALSE | FALSE | ```[erchef.v1.sys.index]```
```track_total_hits=false``` | | opscode_erchef['cbv_cache_enabled'] | FALSE | FALSE | ```[erchef.v1.sys.api]```
```cbv_cache_enabled=false``` | | opscode_erchef['search_queue_mode'] | batch | batch | ```[erchef.v1.sys.index]```
```search_queue_mode="batch"``` | | opscode_erchef['s3_enabled'] | FALSE | FALSE | ```[erchef.v1.sys.api]```
```s3_enabled="true"``` | diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/configuration.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/configuration.md index 482ae5476b..454fdd7e02 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/configuration.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/configuration.md @@ -121,6 +121,17 @@ key = """-----BEGIN RSA PRIVATE KEY----- Then run `chef-automate config patch ` to deploy your change. +### Include X-Forwarded-For Header + +To log the source node IP address in Automate Load Balancer and Chef Server Load Balancer, the following configuration needs to be patched: + +```toml +[global.v1.sys.ngx.http] + include_x_forwarded_for = true +``` +Then run `chef-automate config patch ` to deploy your change. +The Automate Load Balancer and Chef Server Load Balancer will log the content of the `X-Forwarded-For` header data. + #### License Key You can apply for your Chef Automate license with the `chef-automate license apply` command in one of two ways: diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/create_amazon_rds.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/create_amazon_rds.md index 0947de179b..4e63baf037 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/create_amazon_rds.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/create_amazon_rds.md @@ -42,7 +42,7 @@ Before proceeding, make sure you have the following prerequisites in place: 1. Click on **Create database** button in the Amazon RDS dashboard. 1. On the **Choose a database creation method** page, select the **Standard Create** option. 1. Under the **Engine options** section, select **PostgreSQL** as the database engine. -1. Choose **PostgreSQL 13.5-R1**. +1. Choose **PostgreSQL 13.18-R1**. 1. Under the **Templates** section, select the template that suits your needs or choose the default template. 1. In the **Settings** section, provide the following information: - **DB instance identifier**: Enter a unique identifier for your RDS instance. diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_aws_deployment_prerequisites.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_aws_deployment_prerequisites.md index abe15a4c2b..8178b64ce2 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_aws_deployment_prerequisites.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_aws_deployment_prerequisites.md @@ -78,7 +78,7 @@ Current Automate HA integrates with the following non-Chef tools: **In AWS Managed Services** -- **SQL Database:** AWS RDS PostgreSQL: 13.14 +- **SQL Database:** AWS RDS PostgreSQL: 13.18 - **NoSQL Database:** AWS OpenSearch: 1.3 - **Load Balancer:** External not supported @@ -89,7 +89,8 @@ Current Automate HA integrates with the following non-Chef tools: - Refer to [Performance Benchmarks](/automate/ha_performance_benchmarks) for more details on the hardware requirements. - Make sure the hardware requirement in not lesser than the recommended [Minimum Hardware Requirement](/automate/ha_aws_deployment_prerequisites/#minimum-hardware-requirement) - Contact your network manager to set up the above pre-requisites. - +- We recommended that all hardware/VMs be in the same region/data center. + {{< /note >}} ### Minimum Hardware Requirement diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_backup_restore_aws_efs.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_backup_restore_aws_efs.md index 0dcc338aec..7c2674adfa 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_backup_restore_aws_efs.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_backup_restore_aws_efs.md @@ -64,6 +64,11 @@ Configure the OpenSearch `path.repo` attribute. - Above command will restart the OpenSearch cluster. #### Healthcheck commands +- Get the OpenSearch Cluster status + + ```sh + chef-automate status --os + ``` - Following command can be run in the OpenSearch node diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_cert_rotation.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_cert_rotation.md index e20a656992..241017de69 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_cert_rotation.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_cert_rotation.md @@ -41,6 +41,7 @@ To understand how to generate certificates, refer to the [Certificate Generation - If you want to use certificates stored in another node of the HA cluster, you can provide the remote path to the certificates using the `:` format instead of the local path. - `--wait-timeout` This flag sets the operation timeout duration (in seconds) for each individual node during the certificate rotation process. - Certificate rotation should be done in down-time window as service will restart. +- CN (Common Name) should be the same for all certificates in Opensearch nodes. {{< /note >}} ### Rotate Cluster Certificates diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_cert_selfsign.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_cert_selfsign.md index 8ac155e664..73f009c190 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_cert_selfsign.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_cert_selfsign.md @@ -82,7 +82,8 @@ You can create a self-signed key and certificate pair with the **OpenSSL** utili {{< note >}} -To create self-signed certificate for FQDN make sure to provide proper DNS and CN value. The DNS in Subject Alternative Name should match with the CN (Comman Name) +- To create self-signed certificate for FQDN make sure to provide proper DNS and CN value. The DNS in Subject Alternative Name should match with the CN (Common Name). +- CN (Common Name) should be the same for all certificates in Opensearch nodes. {{< /note >}} diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_chef_backend_to_automate_ha.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_chef_backend_to_automate_ha.md index 9b95a60237..05d6840764 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_chef_backend_to_automate_ha.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_chef_backend_to_automate_ha.md @@ -51,7 +51,7 @@ Check the [AWS Deployment Prerequisites](/automate/ha_aws_deployment_prerequisit 2. Execute the below command to install the habitat package for `knife-ec-backup` ```sh - hab pkg install chef/knife-ec-backup + hab pkg install chef/knife-ec-backup -bf ``` 3. Execute the below command to generate a knife tidy server report to examine the stale node, data, etc. diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_disaster_recovery_setup.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_disaster_recovery_setup.md index 273bf982c0..5beccaa7e0 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_disaster_recovery_setup.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_disaster_recovery_setup.md @@ -126,10 +126,11 @@ Configure backups for both clusters using either [file system](/automate/ha_back password = "admin" ``` - - Stop all the services on all Automate and Chef Infra frontend nodes using the following command: + - Stop all the services on all Automate and Chef Infra frontend nodes using the following command, use the below command from the bastion. ```sh - systemctl stop chef-automate + chef-automate systemctl --a2 + chef-automate systemctl --cs ``` - In the disaster recovery cluster, use the following sample command to restore the latest backup from any Chef Automate frontend instance. diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_existing_a2ha_to_automate_ha.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_existing_a2ha_to_automate_ha.md index af67c45f1c..72843f8377 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_existing_a2ha_to_automate_ha.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_existing_a2ha_to_automate_ha.md @@ -79,11 +79,10 @@ done 1. Configure the backup at Automate HA cluster. If you have not configured it, please refer to this [Doc: Pre Backup Configuration for File System Backup](/automate/ha_backup_restore_file_system/#setting-up-the-backup-configuration) -1. From Step 3, you will get the backup mount path. +1. From the above Step, you will get the backup mount path. -1. Stop all the services at frontend nodes in Automate HA Cluster. - -1. Get the Automate version from the location `/var/tmp/` in Automate instance. Example: `frontend-4.x.y.aib`. +1. To run the restore command, we need the airgap bundle. Get the Automate HA airgap bundle from the location `/var/tmp/` in Automate instance. Example: `frontend-4.x.y.aib`. + - In case of airgap bundle is not present at `/var/tmp`, in that case, we can copy the bundle from the bastion node to the Automate node. 1. Run the command at the Chef-Automate node of Automate HA cluster to get the applied config: @@ -97,18 +96,9 @@ done sudo chef-automate stop ``` -1. To run the restore command, we need the airgap bundle. Get the Automate HA airgap bundle from the location `/var/tmp/` in Automate instance. Example: `frontend-4.x.y.aib`. - - In case of airgap bundle is not present at `/var/tmp`, in that case, we can copy the bundle from the bastion node to the Automate node. - -1. Run the command at the Chef-Automate node of Automate HA cluster to get the applied config - - ```bash - sudo chef-automate config show > current_config.toml - ``` - 1. Add the OpenSearch credentials to the applied config. - - If using Chef Managed OpenSearch, add the config below into `current_config.toml` (without any changes). + - If using Chef Managed OpenSearch, add the config below into `current_config.toml` (unless you have changed the credentials). ```bash [global.v1.external.opensearch.auth.basic_auth] @@ -136,14 +126,14 @@ done {{% automate/char-warn %}} {{< /warning >}} -```bash -[global.v1.external.opensearch.auth] - scheme = "aws_os" -[global.v1.external.opensearch.auth.aws_os] - username = "THIS YOU GET IT FROM AWS Console" - password = "THIS YOU GET IT FROM AWS Console" - access_key = "" - secret_key = "" +```sh + [global.v1.external.opensearch.auth] + scheme = "aws_os" + [global.v1.external.opensearch.auth.aws_os] + username = "THIS YOU GET IT FROM AWS Console" + password = "THIS YOU GET IT FROM AWS Console" + access_key = "" + secret_key = "" ``` 1. Copy the `bootstrap.abb` bundle to all the Frontend nodes of the Chef Automate HA cluster. Unpack the bundle using the below command on all the Frontend nodes. @@ -151,25 +141,26 @@ done ```sh sudo chef-automate bootstrap bundle unpack bootstrap.abb ``` -2. Stop the Service in all the frontend nodes with the below command. + +1. Stop the Service in all the frontend nodes with the below command. ``` bash sudo chef-automate stop ``` -3. To restore the A2HA backup on Chef Automate HA, run the following command from any Chef Automate instance of the Chef Automate HA cluster: +1. To restore the A2HA backup on Chef Automate HA, run the following command from any Chef Automate instance of the Chef Automate HA cluster: ```sh sudo chef-automate backup restore /mnt/automate_backups/backups/20210622065515/ --patch-config current_config.toml --airgap-bundle /var/tmp/frontend-4.x.y.aib --skip-preflight ``` -4. After successfully executing the restore, you will see the below message: +1. After successfully executing the restore, you will see the below message: ```bash Success: Restored backup 20210622065515 ``` -5. Start the Service in all the frontend nodes with the below command. +1. Start the Service in all the frontend nodes with the below command. ``` bash sudo chef-automate start diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_inplace_migration.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_inplace_migration.md index 195e686667..e2c6bf5131 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_inplace_migration.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_inplace_migration.md @@ -190,7 +190,7 @@ OR chef-automate config show > applied_config.toml ``` -Modify `applied_config.toml`, remove the elastic search config, and set the config. Set `applied_config.toml` on all the frontend nodes manually. As the removal of config is not supported from the bastion. Use the below command to set the config manually. +Modify `applied_config.toml`, remove the elastic search config, and set the config. Set `applied_config.toml` on all the frontend nodes manually. As the removal of config is not supported from the bastion. Use the below command to set the config manually on each Frontend node. ```bash chef-automate config set applied_config.toml diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_on_premises_deployment_prerequisites.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_on_premises_deployment_prerequisites.md index 952cffb18d..23a177d036 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_on_premises_deployment_prerequisites.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/ha_on_premises_deployment_prerequisites.md @@ -76,7 +76,7 @@ We do not support **Chef Manage** integration in the ongoing Automate version. Current Automate HA integrates with the following non-Chef tools: -- **SQL Database:** PostgreSQL: 13.14 +- **SQL Database:** PostgreSQL: 13.18 - **NoSQL Database:** OpenSearch: 1.3.7 - **Load Balancer:** NGINX: 1.21.3 or HA Proxy: 2.2.18 or AWS Application Load Balancer @@ -87,7 +87,7 @@ Current Automate HA integrates with the following non-Chef tools: - Refer to [Performance Benchmarks](/automate/ha_performance_benchmarks) for more details on the hardware requirements. - Make sure the hardware requirement is not less than the recommended [Minimum Hardware Requirement](/automate/ha_on_premises_deployment_prerequisites/#minimum-hardware-requirement) - Contact your network manager to set up the above pre-requisites. - +- We recommended that all the hardware/VMs be in the same region/data center. {{< /note >}} ### Minimum Hardware Requirement diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/infra_server.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/infra_server.md index 1e08f04085..ebdda96d23 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/infra_server.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/infra_server.md @@ -27,6 +27,12 @@ with Chef Automate. {{< /warning >}} +{{< warning >}} + +The Chef Server deployed and running with Automate will also require a license. The Chef Automate license will cover the Chef Server license. + +{{< /warning >}} + Use Chef Automate to install Chef Infra Server either for a single-host installation that contains both Chef Infra Server and Chef Automate, or for a standalone Chef Infra Server instance. See the [Chef Infra Server documentation]({{< relref "server.md" >}}) for instructions and guidance on using and managing your Chef Infra Server. @@ -241,7 +247,15 @@ The [`knife` command-line utility]({{< relref "workstation/knife.md" >}}) provid On the Chef Infra Server host: -1. Run the following command to create a user: +1. Apply License: + Chef Automate offers two license tiers that have different entitlements: + **Trial:** A trial license is for users or organizations interested in exploring the product before buying. Generate the license from https://www.chef.io/license-generation-free-trial + **Commercial:** A commercial license is for customers who have purchased and are entitled to use it according to the license terms. + + If you do not have the license, you can use the trial license to explore the product or contact the Chef Account Team to get a commercial license. + Please follow the instructions in the [Chef Automate License]({{< relref "chef_automate_license.md" >}}) documentation to apply for the license. + +2. Run the following command to create a user: ```shell sudo chef-server-ctl user-create USER_NAME FIRST_NAME LAST_NAME EMAIL 'PASSWORD' --filename USER_NAME.pem @@ -251,7 +265,7 @@ On the Chef Infra Server host: Save this RSA private key to a safe location. The `--filename` option will save the RSA private key to the specified absolute path. -1. Run the following command to create an organization, generate its validator key, and assign the user created in the previous step as an administrator: +3. Run the following command to create an organization, generate its validator key, and assign the user created in the previous step as an administrator: ```shell sudo chef-server-ctl org-create SHORT_NAME 'FULL_ORGANIZATION_NAME' --association_user USER_NAME --filename ORGANIZATION-validator.pem diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/invalid_login_attempts.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/invalid_login_attempts.md index 13349b7d86..52eb92beb3 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/invalid_login_attempts.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/invalid_login_attempts.md @@ -16,11 +16,11 @@ Invalid Login Attempts is available only in case of local or LDAP users. Chef Automate shows error message for invalid login attempts for local or LDAP user as shown below. -![Chef Automate Invalid Login Attempts](/images/automate/invalid_login_attempts_error_msg.png) +{{< figure src="/images/automate/invalid_login_attempts_error_msg.png" width="500" alt="Chef Automate Invalid Login Attempts">}} Chef Automate shows error message for blocked local or LDAP user as shown below. -![Chef Automate Blocked User](/images/automate/blockd_user_login_error_msg.png) +{{< figure src="/images/automate/blockd_user_login_error_msg.png" width="500" alt="Chef Automate Blocked User">}} Chef Automate lets you configure **Invalid Login Attempts**, which is enabled (by default) to avoid multiple failed login attempts in a shorter time. Chef Automate also blocks the user for a specified duration (in minutes) once the maximum allowed number of invalid login attempts reached diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/log_management.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/log_management.md index 4903ba7407..decab7ec58 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/log_management.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/log_management.md @@ -46,6 +46,29 @@ level = "debug" Then run `chef-automate config patch ` to deploy your change. + ## Configuring Log Rotation and Retention Log rotation and retention settings are managed at a system level using `journald`. At this point, `journald` does not support log retention policies at a granular level for units within itself. See the [man page](https://www.freedesktop.org/software/systemd/man/journald.conf.html) for more configuration options in `/etc/systemd/journald.conf`. + + +## Configuring Rate Limiter + +The rate limiter is used to control the volume of log messages that are written to the journal. You can configure Rate Limiter by creating a TOML file. + +```shell +[global.v1.log] +rate_limit_interval = 30 +rate_limit_burst = 10000 +``` + +Then run `chef-automate config patch ` to deploy your change. + +Set the following values: + +- `rate_limit_interval`: This defines the time interval for rate-limiting in seconds. For example, if it's set to 30s, journald will track messages within each 30-seconds window. Default value will be same as the `journald` default value, which is `30` [Journal Page](https://www.freedesktop.org/software/systemd/man/latest/journald.conf.html#RateLimitIntervalSec=). +- `rate_limit_burst`: This sets the maximum number of messages allowed within the interval defined by rate_limit_interval. If more messages are received within the interval, they will be temporarily suppressed to avoid spamming the journal. Default value will be same as the `journald` default value, which is `10000` [Journal Page](https://www.freedesktop.org/software/systemd/man/latest/journald.conf.html#RateLimitIntervalSec=). + +{{< warning >}} +By enabling this configuration it may lead to increasing disk utilization. +{{< /warning >}} \ No newline at end of file diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/restore.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/restore.md index d1ca6e2849..be7126bb51 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/restore.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/restore.md @@ -207,11 +207,13 @@ Success: Restored backup 20180517223558 ## Troubleshooting -Set the log level to `debug` before re-running a failed restore to output debug info to the Chef Automate log: +1. Set the log level to `debug` before re-running a failed restore to output debug info to the Chef Automate log: -```shell -chef-automate debug set-log-level deployment-service debug -``` + ```shell + chef-automate debug set-log-level deployment-service debug + ``` + +1. If you have already deployed Chef Automate and are getting this error in the logs while restoring: `The Access Key ID you provided does not exist in our records`. Before proceeding, delete the `.tmp` folder in the configured backup directory (the default directory is `/var/opt/chef-automate/backups`). ## References diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/reusable/md/opensearch_health_check.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/reusable/md/opensearch_health_check.md index 0e71846815..352fc4399d 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/reusable/md/opensearch_health_check.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/reusable/md/opensearch_health_check.md @@ -1,5 +1,11 @@ Use the following commands on OpenSearch nodes to verify their health status. +1. Get the OpenSearch Cluster status from the bastion + + ```sh + chef-automate status --os + ``` + 1. Verify that the Habitat service is running. ```sh diff --git a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/troubleshooting.md b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/troubleshooting.md index c2a557520d..8d8b70797e 100644 --- a/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/troubleshooting.md +++ b/_vendor/github.com/chef/automate/components/docs-chef-io/content/automate/troubleshooting.md @@ -180,3 +180,46 @@ max_shards_per_node = 1000 ``` Once done, run the chef-automate config patch `` to deploy your change. + +## Issue: Knife search limits at 10000 records + +### Details + +The knife node list and knife node search commands are inconsistent in the number of records they return. By default, knife search returns a maximum of 10,000 records. + +### Fixes + +This issue occurs because OpenSearch, by default, limits the maximum number of records (or documents) returned in a single query to 10,000. This safeguard prevents large queries from overloading the system. This approach will do that if you try to retrieve more than 10,000 records. + +#### Step 1: Increase the max_result_window to retrieve more than **10000** records. + +In the case of embedded opensearch: + +```bash +curl -XPUT "http://127.0.0.1:10144/chef/_settings" \ + -d '{ + "index": { + "max_result_window": 50000 + } + }' \ + -H "Content-Type: application/json" +``` + +Changes can be verified by doing the following: + +```bash +curl http://127.0.0.1:10144/_settings?pretty +``` + +For external OpenSearch, ensure the `max_result_window` is also increased accordingly. + +#### Step 2: Patch the config in Automate + +To set the value of tracking total hits in OpenSearch, patch the following configuration in the `.toml` file. + +```bash +[erchef.v1.sys.index] + track_total_hits = true +``` + +Once done, run the chef-automate config patch `` to deploy your change. diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/js/feedback.js b/_vendor/github.com/chef/chef-docs-theme/assets/js/feedback.js index 11179f0c5b..8a8065dd73 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/js/feedback.js +++ b/_vendor/github.com/chef/chef-docs-theme/assets/js/feedback.js @@ -104,6 +104,8 @@ function submitContactFormFeedback(event) { .catch((error) => alert(error)); }; -document - .querySelector("#feedback-form") - .addEventListener("submit", submitContactFormFeedback); +const feedbackForm = document.querySelector("#feedback-form"); + +if (feedbackForm) { + feedbackForm.addEventListener("submit", submitContactFormFeedback); +} diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/js/swiftype-config.js b/_vendor/github.com/chef/chef-docs-theme/assets/js/swiftype-config.js index c854cf9728..c310c08d6d 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/js/swiftype-config.js +++ b/_vendor/github.com/chef/chef-docs-theme/assets/js/swiftype-config.js @@ -9,40 +9,98 @@ $(document).ready(function() { - // Swiftype UI elements // + // Retrieve list of default search product keys from search page HTML and parse into JSON array + let defaultSearchProducts = $('#swiftype-search').data('default-search-keys'); + + function returnParsedJson(jsonString) { + if (jsonString) { + let stringifiedJSON = JSON.stringify(jsonString); + let parsedJSON = JSON.parse(stringifiedJSON); + return parsedJSON; + } else { + return null; + } + } + + let parsedDefaultSearchProducts = returnParsedJson(defaultSearchProducts); + + /////////////////////////////////// + // + // Search Modal functions + // + /////////////////////////////////// - var showSearchModal = function() { - $("#swiftype-modal").show(500); - $("#swiftype-search-form-modal").focus(); + function showSearchModal(event) { + $("#swiftype-modal").show(250); + $("#swiftype-search-form-modal-input").focus(); + event.stopPropagation(); } - var hideSearchModal = function() { + function hideSearchModal() { $("#swiftype-modal").hide(250); - $("#swiftype-custom-facets input:checkbox[class='product-filter']").prop( "checked", false ); - window.location.hash = ""; + $('input#swiftype-search-form-modal-input').val(''); } - $("#swiftype-close-button").click(function(){ + // Hide search modal if clicking close button + $("#swiftype-search-close-button").click(function(){ hideSearchModal(); }); - $('body').click(function (event) { - if($('#swiftype-modal').is(":visible") && !$(event.target).closest('#swiftype-modal-content').length && !$(event.target).is('#swiftype-modal-content')) { - hideSearchModal(); + // Hide search modal if it's already visible and click outside modal box + $('body').on('click', function(event) { + if ($('#swiftype-modal').is(':visible') && !$(event.target).closest("#swiftype-modal").length) { + $('#swiftype-modal:visible').hide(); } }); - $("#swiftype-custom-facets-toggle-button").click(function(){ - if ($(window).width() < 768) { - $("#swiftype-custom-facets").toggle(500); - $("#swiftype-custom-facets-toggle-caret").find('svg').toggle(); - } + // Show search modal when clicking on search bar in top nav + $("#swiftype-search-top-nav").click(function(event){ + showSearchModal(event); + }); + + // Clear text in search modal if x button is clicked + $('#swiftype-search-form-modal-input-clear').click(function() { + $('input#swiftype-search-form-modal-input').val(''); + $('input#swiftype-search-form-modal-input').focus(); + }); + + // on pressing enter key, navigate to search page and submit search string + $("input.swiftype-search-input").on('keypress', function (event) { + if (event.keycode == 13 || event.which == 13) { + event.preventDefault(); + window.location.href = "/search/#stq=" + encodeURIComponent($(this).val()) + '&stp=1'; + hideSearchModal(); + }; }); - $('#swiftype-facet-infra').on('change',function(){ - $('#swiftype-facet-client, #swiftype-facet-server').prop('checked',$(this).prop('checked')); + // on clicking modal search button, navigate to search page and submit search string + $("#swiftype-search-form-modal-input-search").click(function(){ + const searchInput = $("input#swiftype-search-form-modal-input").val() + window.location.href = "/search/#stq=" + encodeURIComponent(searchInput) + '&stp=1'; + hideSearchModal(); + }); + + /////////////////////////////////// + // + // Search Input functions + // + /////////////////////////////////// + + // If x button next to input is clicked: + // Clear search input + // Reset search in URL + // Reset search results + $('input#swiftype-search-top-container-form-input-clear').click(function() { + $('input#swiftype-search-top-container-form-input').val(''); + $('input#swiftype-search-top-container-form-input').focus(); + history.pushState({page: "Chef Documentation Search"}, "", "/search/") }); + $("input#swiftype-search-top-container-form-input-search").on('click', function() { + const searchString = $('input#swiftype-search-top-container-form-input').val(); + window.location.href = "/search/#stq=" + encodeURIComponent(searchString) + '&stp=1'; + }); + // trigger hideCustomFacets function after resize ends var debounce = function(fn, interval) { let timer; @@ -54,18 +112,73 @@ $(document).ready(function() { }; } + // show and hide elements when resizing var hideCustomFacets = function() { if ($(this).width() > 768) { - $('#swiftype-custom-facets').show(); + $('#swiftype-custom-facet-products').show(); + $("#search-facet-product-toggle-caret > svg.fa-caret-down").hide(); + $("#search-facet-product-toggle-caret > svg.fa-caret-up").hide(); } else { - $('#swiftype-custom-facets').hide(); - $("#swiftype-custom-facets-toggle-caret > svg.fa-caret-down").hide(); - $("#swiftype-custom-facets-toggle-caret > svg.fa-caret-up").show(); + $('#swiftype-custom-facet-products').hide(); + $("#search-facet-product-toggle-caret > svg.fa-caret-down").hide(); + $("#search-facet-product-toggle-caret > svg.fa-caret-up").show(); } } $(window).resize(debounce(hideCustomFacets, 400)); + /////////////////////////////////// + // + // Search Filter functions + // + /////////////////////////////////// + + // On selecting a checkbox for a versioned product: + // 1. display the version select tag + + // On deselecting a checkbox for a versioned product + // selected versioned checkboxes are deselected + $('.swiftype-product-with-versions').on('change', function(){ + + const versionListId = $($(this).data('version-selector-id')); + + if ($(this).is(':checked')) { + versionListId.show(); + } else { + versionListId.hide(); + } + + getChefProducts(); + reloadResults(); + }); + + // When selecting a version option + // 1. regenerate results + $('select.search-facet-versions').on('change', function(){ + getChefProducts(); + reloadResults(); + }); + + // When the product facet checkboxes are checked/unchecked, update the array of products and reload the results + $("#swiftype-custom-facets input:checkbox[class='product-filter']").change(function() { + getChefProducts(); + reloadResults(); + }); + + // "Clear all" button resets search filters + // show hidden products + // hide version checkboxes + // uncheck everything + // reload results + $('#swiftype-clear-all-filters').on('click', function() { + $('#swiftype-custom-facets input[type=checkbox]').prop('checked', false).css('display', 'inline-block'); + $('select.search-facet-versions').css('display', 'none'); + + getChefProducts(); + reloadResults(); + }); + + const searchHashRegex = /^#stq./; const searchStringMatchRegex = /^#stq=(.*)/; const searchPageNumRegex = /&stp=\d{1,3}$/; @@ -79,7 +192,7 @@ $(document).ready(function() { } else { var matchString = decodeURIComponent(hash); }; - $('input#swiftype-search-form-modal').val(matchString); + $('input#swiftype-search-top-container-form-input').val(matchString); }; // Watch for hashchange @@ -89,21 +202,18 @@ $(document).ready(function() { $(window).on('hashchange', function() { if (searchHashRegex.test(window.location.hash)) { processLocationHash(); - showSearchModal(); } }); if (searchHashRegex.test(window.location.hash)) { processLocationHash(); - showSearchModal(); }; - // Autocomplete UI elements - $("input.swiftype-search-input").on('keypress', function (event) { - if (event.keycode == 13 || event.which == 13) { - event.preventDefault(); - window.location.hash = 'stq=' + encodeURIComponent($(this).val()) + '&stp=1'; - }; + $("#search-facet-product").click(function() { + if ($(window).width() < 860) { + $("#swiftype-custom-facet-products").toggle(500); + $("#search-facet-product-toggle-caret").find('svg').toggle(); + } }); ///////////////////////// @@ -113,14 +223,16 @@ $(document).ready(function() { "facets": {} }; - ///////// - // Handle Regular Search Results - ///////// + // Define default products used in search + searchConfig.facets['chef-products'] = parsedDefaultSearchProducts; + var resultTemplate = Hogan.compile([ "
  • ", "", "{{title}}", - "Product: {{product}} {{{sections}}} • {{{body}}}", + "Product: {{product}} ", + "{{{sections}}}", + "{{{body}}}", "", "
  • " ].join('') ); @@ -137,24 +249,25 @@ $(document).ready(function() { return resultTemplate.render(data); }; - // Update the hash value in window.location // + // Update the hash value in window.location var reloadResults = function() { - window.location.hash = window.location.hash.replace(/stp=[^&]*/i, 'stp=1'); // Reset to page 1 + // Reset window to page 1 + window.location.hash = window.location.hash.replace(/stp=[^&]*/i, 'stp=1'); $(window).hashchange(); }; - //Checking the Infra checkbox will also check the Infra Client and Infra Server checkboxes. - $('#swiftype-facet-infra').on('change',function(){ - $('#swiftype-facet-client, #swiftype-facet-server').prop('checked',$(this).prop('checked')); - }); + // Get all Chef products selected in product checkbox field + // If no checkboxes are selected, return the default list of products + const getChefProducts = function(){ + if ($('#swiftype-product-filters :checkbox:checked').length === 0) { + searchConfig.facets['chef-products'] = parsedDefaultSearchProducts; + } else { + searchConfig.facets['chef-products'] = $("#swiftype-custom-facets input:checkbox[name='chef-product']:checked, select.search-facet-versions:visible option:selected").map(function() { + return $(this).val() + }).get(); + } + }; - // When the product facet checkboxes are checked/unchecked, update the array of products and reload the results - $("#swiftype-custom-facets input:checkbox[class='product-filter']").change(function() { - searchConfig.facets['chef-products'] = $("#swiftype-custom-facets input:checkbox[name='chef-product']:checked").map(function() { - return $(this).val() - }).get(); - reloadResults(); - }); // Returns an array of the chef-products to filter by var readFilters = function () { @@ -172,59 +285,20 @@ $(document).ready(function() { } } - ///////// - // Handle Autocomplete Search Results - ///////// - - var resultAutocompleteTemplate = Hogan.compile([ - "", - "{{title}}", - "{{{sections}}}", - "" - ].join('') ); - - var customAutocompleteFunction = function(document_type, item) { - var - data = { - title: item['title'], - url: item['url'], - sections: item['highlight']['sections'], - }; - return resultAutocompleteTemplate.render(data); - }; - - var autoHighlightFields = { - "page": { - "sections":{"size": 200, "fallback":true}, - "body":{"size": 250, "fallback": true}, - } - } - /* The swiftypeSearch function is from the Swiftype jQuery Plugin - "jquery.swiftype.search.js" https://swiftype.com/documentation/site-search/guides/jquery https://github.com/swiftype/swiftype-search-jquery */ - $('#swiftype-search-form-modal').swiftypeSearch({ + $('#swiftype-search-top-container-form-input').swiftypeSearch({ resultContainingElement: '#swiftype-search-results', engineKey: 'mXqaEKYsv--xS9fcY3Jz', renderFunction: customRenderFunction, facets: { page: ['chef-product'] }, filters: readFilters, - perPage: 8, + perPage: 10, highlightFields: highlightFields, }); - /* - The swiftype function is from the autocomplete plugin - "jquery.swiftype.autocomplete.js" - https://swiftype.com/documentation/site-search/guides/jquery - https://github.com/swiftype/swiftype-autocomplete-jquery - */ - - $('.swiftype-search-autocomplete').swiftype({ - engineKey: 'mXqaEKYsv--xS9fcY3Jz', - highlightFields: autoHighlightFields, - renderFunction: customAutocompleteFunction, - }); }); diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/js/version-docs.js b/_vendor/github.com/chef/chef-docs-theme/assets/js/version-docs.js deleted file mode 100644 index 8aa4b8d959..0000000000 --- a/_vendor/github.com/chef/chef-docs-theme/assets/js/version-docs.js +++ /dev/null @@ -1,101 +0,0 @@ - -// Display text divs with parentClass class and displayClass class -// Hide other text divs with just parentClass class -displayHideTextBlocks = function(displayClass, parentClass){ - for (var i = 0; i < parentClass.length; i++) { - versionedText = parentClass[i]; - versionedTextVersion = parentClass[i].classList[1]; - - if (versionedTextVersion === displayClass) { - versionedText.style.display = "block"; - } else { - versionedText.style.display = "none"; - } - } -} - -// Display correct product/version in dropdown list -changeDropdownListValue = function(version){ - var opts = dropdownId.options.length; - for (var i=0; i." - console.log("This browser does not support Window.localstorage") - }; - - } else { - urlVersion = urlVersion.split("#")[0] - displayHideTextBlocks(urlVersion, versionedTextBlocks) - changeDropdownListValue(urlVersion) - if (typeof(Storage) !== "undefined") { - localStorage.setItem(docsProductVersionKey, urlVersion); - } else { - // If browser does not support Window.localstorage - // Drop a div in between each section of the versioned documentation - // Stating something like "The following is documentation for version x.y of ." - console.log("This browser does not support Window.localstorage") - }; - }; -}; diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/_homepage.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/_homepage.scss index d35fceb21a..e7f45b4c1e 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/sass/_homepage.scss +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/_homepage.scss @@ -59,7 +59,6 @@ .cell{ -webkit-box-shadow: $box-shadow; - -moz-box-shadow: $box-shadow; box-shadow: $box-shadow; border: 1px solid transparent; } diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/main.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/main.scss index 5a43ad1756..d08170bc7a 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/sass/main.scss +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/main.scss @@ -33,4 +33,5 @@ body { @import "partials/tab-container"; @import "partials/toc"; @import "partials/utility-bar"; -@import "partials/breadcrumbs" +@import "partials/breadcrumbs"; +@import "partials/version_selector" diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_breadcrumbs.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_breadcrumbs.scss index dd75afc315..f18cf8ec48 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_breadcrumbs.scss +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_breadcrumbs.scss @@ -1,7 +1,7 @@ #breadcrumb { - padding: 1rem 1.5rem 1rem 0; - font-size: .9rem; + font-size: .8rem; + margin: 2rem 0 1rem 0; ol { padding-left: 0; @@ -9,6 +9,9 @@ } li { display: inline; + a { + padding: 5px; + } &:not(:last-child)::after { content: " / "; diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_grid.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_grid.scss index e3395b6a72..c00d1230dd 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_grid.scss +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_grid.scss @@ -28,7 +28,6 @@ display: block; margin: rem-calc(32) auto; -webkit-box-shadow: $box-shadow; - -moz-box-shadow: $box-shadow; box-shadow: $box-shadow; border: 1px solid transparent; padding: 1rem; @@ -49,7 +48,6 @@ text-indent: 0; border: 1px solid transparent; -webkit-box-shadow: $box-shadow; - -moz-box-shadow: $box-shadow; box-shadow: $box-shadow; padding: 0.5rem; margin: rem-calc(32) auto; @@ -71,7 +69,6 @@ padding: 0; border: none; -webkit-box-shadow: none; - -moz-box-shadow: none; box-shadow: none; } } diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_sidebar.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_sidebar.scss index 69086802db..77c4091ef6 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_sidebar.scss +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_sidebar.scss @@ -1,8 +1,6 @@ #left-nav-on-canvas { - margin-top: .5rem; - padding: rem-calc(18 0); + margin: .5rem 1rem 0 0; z-index: 50; - width: 260px; box-shadow: none; } @@ -23,6 +21,9 @@ color:$orange-lighter; } } + #top-bar-close { + height: 25px; + } } .sidebar { @@ -33,10 +34,10 @@ #sidebar-nav{ height: 100%; - z-index: 25; + padding: 0 10px; overflow-y: scroll; overflow-x: hidden; - margin: 0 10px; + &.offCanvas{ width: inherit; } @@ -45,11 +46,10 @@ margin-bottom: 30px; > .accordion-menu { - font-size: rem-calc(14px); > li { > a { - font-weight: 700; + font-weight: 600; } a { @@ -60,6 +60,7 @@ &:focus { outline: none; } + padding: .75rem 0 .75rem 1rem; } } diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_swiftype_search.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_swiftype_search.scss index 2fc4228157..a547b301f8 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_swiftype_search.scss +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_swiftype_search.scss @@ -1,31 +1,76 @@ #swiftype-modal { - display: none; /* Hidden by default */ - position: fixed; /* Stay in place */ - z-index: 1000; /* Sit on top */ - left: 0; - top: 0; - width: 100%; /* Full width */ - height: 100%; /* Full height */ - background-color: rgb(0,0,0); /* Fallback color */ - background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ + display: none; + background-color: #fefefe; + left: 50%; + top: 90px; + position: absolute; + transform: translate(-50%, -50%); + z-index: 1000; + border-radius: $border-radius-base; + + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + padding: 10px; + font-size: 1rem; + + @media (max-width: map-get($breakpoints, medium)) { + width: 100%; + } + + @media not (max-width: map-get($breakpoints, medium)) { + width: 60%; + } &-content { - background-color: #fefefe; - padding: 20px; - border: 1px solid #888; - width: 80%; - height: 90%; - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - overflow-y: hidden; display: flex; - flex-direction: column; + align-items: center; + font-size: 1rem; + flex-direction: row; + + #swiftype-search-form-modal { + flex: 1; + flex-shrink: 1; + } + + #swiftype-search-close { + + flex: 0; + position: relative; + top: -15px; + + &-button { + display: inline; + vertical-align: text-top; + font-size: 1.5rem; + margin: 0 .5rem 0 .75rem; + margin-bottom: auto; + } + } + + .input-group { + margin: 1rem; + min-width: 10px; + } + + input { + border: 1px solid $border-dark; + } + + #swiftype-search-form-modal-input{ + border-right: none; + padding: 2px; + } + + #swiftype-search-form-modal-input-clear { + background: none; + border-left: none; + padding: 0 10px; + margin-right: 5px; + } + } } -#swiftype-lower-container{ +#swiftype-lower-container { overflow-y: hidden; padding-bottom: 10px; display: flex; @@ -33,7 +78,7 @@ width: 100%; height: 100%; - #swiftype-modal-content-container{ + #swiftype-content-container{ margin: 0 1rem 1rem 0; overflow-y: hidden; display: flex; @@ -41,41 +86,56 @@ width: 100%; height: 100%; - h3 { - font-size: 1.25rem; - font-weight: 600; - margin-top: 1rem; - padding-top: 0; - display: inline; - position: relative; - } - #swiftype-container-left-sidebar { padding-top: 1rem; flex-grow: 0; - span#swiftype-custom-facets-toggle-caret{ - color: $accordionmenu-arrow-color; - margin-left: .5rem; + #swiftype-filters-heading{ + border-bottom: 1px solid $border-dark; + padding: 10px 0; } - label { - font-size: .8rem; + #swiftype-filters-title { + font-size: 1.2rem; + font-weight: 700; } - #swiftype-custom-facets{ - >ul{ - margin: 1em 0; - ul{ - margin-left: 1em; - } + + #swiftype-clear-all-filters { + margin-top: 10px; + } + + #swiftype-product-filters{ + border-bottom: 1px solid $border-dark; + padding: 20px 0; + + select { + width: 100%; + max-width: 120px; + border: 1px solid $border-dark; + height: 2rem; + border-radius: $border-radius-base; } - ul { - list-style-type: none; - input { - margin-bottom: .75em; - } + } + + #search-facet-product { + font-size: 1.2rem; + font-weight: 600; + } + + #swiftype-version-filters { + border-bottom: 1px solid $border-dark; + padding: 20px 0; + display: none; + + .swiftype-product-versions { + display: none; } } + + .search-facet-versions { + display: none; + margin: 0 0 1rem 1.5rem; + } } #swiftype-results-container{ @@ -86,8 +146,10 @@ flex-grow: 1; padding-top: 16px; - #swiftype-results-heading{ + #swiftype-results-heading { flex-grow: 0; + font-size: 1.5rem; + font-weight: 600; } #swiftype-search-results { overflow-y: scroll; @@ -95,42 +157,57 @@ padding-right: 10px; width: 100%; flex: 1 1 auto; - margin-left: 0; - a { - padding: .5rem 0; + margin: 0; + + li { + padding: 10px 0; border-bottom: 1px solid $border-dark; - display: block; - width: 100%; - >span { - display: inherit; - overflow: hidden; - &.st-result-title { - font-size: 15px; - font-weight: 500; - line-height: 1.2; - } - &.st-result-detail { - font-size: 12px; - font-weight: 400; - line-height: 1.4; - color:$lightgray; - em { - color: $gray + a { + padding: .5rem 0; + + display: block; + text-decoration: none; + width: 100%; + >span { + display: inherit; + overflow: hidden; + + &.st-result-detail-body, &.st-result-sections { + @media (max-width: map-get($breakpoints, medium)) { + display: none; + } } - >.st-result-highlight-product{ - color:red; + + &.st-result-title { + font-size: 1.25rem; + font-weight: 500; + line-height: 1.2; + } + &.detail { + color: $charcoal; + padding: 2px 0; + + em { + font-weight: 500; + + } + } + &.st-result-highlight-product{ display: none; } } } } + >.st-page { - border-bottom: 1px solid $border-dark; - overflow:hidden; + >a { position: relative; border-bottom: none; width: auto; + margin-top: 5px; + padding: 5px 0; + font-size: 1rem; &.st-prev { float: left; } @@ -150,183 +227,55 @@ } } -@media (max-width: 768px) { - #swiftype-modal-content { - width: 100%; - height: 100%; - } - .st-result-detail-body { - display: none; - } - #swiftype-lower-container { - #swiftype-modal-content-container { - flex-direction: column; - } - } - #swiftype-custom-facets { - display: none; - } -} - /////// -// Search Input +// Swiftype Search /////// -#left-nav-off-canvas-top-bar { - @include top-bar-unstack; - .search { - display: inline-block; - margin-right: 1rem; - } - .close-button { - position: relative; - margin: 0 0 0 1rem; - display: inline-block; - right: 0; - top: 0; - } -} +#swiftype-search { + &-top-container { + &-input { + width: 80%; + } + &-form { + border-radius: $border-radius-base; + outline: none; + + &-input { + padding: 10px; + font-size: 1rem; + width: 90%; + border: 1px solid $border-dark; + border-right: none; + height: 2.5rem; + + &-clear { + + font-size: 1rem; + padding: 10px; + border-left: none; + border-right: 1px solid $border-dark; + border-top: 1px solid $border-dark; + border-bottom: 1px solid $border-dark; -form > input.swiftype-search { - - &-input { - padding: 7px 11px 7px 28px; - font-size: 14px; - font-weight: 400; - line-height: 16px; - border-radius: $border-radius-base; - border: 1px solid #ccc; - outline: none; - background: #fcfcfc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUFJREFUeNqU0j0oRWEcx/Hj3ifvlMHL7C1lY7mDwUBKkoksBjKJxWIQu7xlOybDLVGukhhMZDFbxGBS8nIjKR3E96nf0dPjuuVfn+6tc35P//P8/yYMw8CpbgygGQlcYw8H+Ai8MvotxQImgt81hk1M4cEPF2IV43jCGo7wjk5MYhhlGMKbG+7BKO4wiGPn8DO1vIN+jGA9fpjQaUksecG4zjGPL3VQ5IZb9OAw+LtO1FkjatxwUuEoTzjSbRu9/xO+0W97nnArqvXuoxve1/9p1OUIlmNGU7EX9+KGt3GKNuyiC5WoQAe2NJFP3PpzzmoR0khpxle6h3pnkeKJPCPjbtglerVFfWhSVxfqJtK4qrChTMY4XdjVm9O21aIA92LrFcv6HHtAsclxQVnxa0WfsqgDUib4X9muStCA2W8BBgDJ0EeGeFZ8WAAAAABJRU5ErkJggg==) no-repeat 5px 8px; - } + margin-right: 10px; + background-color: $white; - &-autocomplete { - margin: 5px 0; - display: inline-block; - height: 2.5em; - } -} + &:hover { + color: $white; + background-color: $body-font-color; + } -#swiftype-modal-search-form { - form > #swiftype-search-form-modal { - width: 100%; - margin-right: 10px; - box-sizing: border-box; - height: 32px; + } + } + } } - - - #swiftype-close-button { - font-size: .9rem; - margin-left: 10px; - padding: 6px; - border: 1px solid $border-dark; - border-radius: $border-radius-base; - - &:hover { - color: $white; - background-color: $body-font-color; + #swiftype-lower-container { + #swiftype-custom-facets{ + .swiftype-custom-facet-content { + @media (max-width: map-get($breakpoints, mediumlarge)) { + display: none; + } + } } } } - -///// -// Autocomplete Search Results -///// - -.swiftype-widget .autocomplete { - border-radius: $border-radius-base; - background-color: $white; - display: block; - list-style-type: none; - margin: 0; - padding: 0; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); - position: absolute; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - -ms-border-radius: 3px; - -o-border-radius: 3px; - border-radius: 3px; - text-align: left; -} - -.swiftype-widget .autocomplete ul { - background-color: #fff; - display: block; - list-style-type: none; - margin: 0; - padding: 0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - -ms-border-radius: 3px; - -o-border-radius: 3px; - border-radius: 3px; - text-align: left; -} - -.swiftype-widget .autocomplete li { - border-top: 1px solid $border; - cursor: pointer; - padding: 10px 8px; - font-size: 12px; - font-weight: 400; - list-style-type: none; - background-image: none; - margin: 0; -} - -.swiftype-widget .autocomplete li:first-child { - -webkit-border-radius: 3px 3px 0 0; - -moz-border-radius: 3px 3px 0 0; - -ms-border-radius: 3px 3px 0 0; - -o-border-radius: 3px 3px 0 0; - border-radius: 3px 3px 0 0; -} - -.swiftype-widget .autocomplete li:last-child { - -webkit-border-radius: 0 0 3px 3px; - -moz-border-radius: 0 0 3px 3px; - -ms-border-radius: 0 0 3px 3px; - -o-border-radius: 0 0 3px 3px; - border-radius: 0 0 3px 3px; -} - -.swiftype-widget .autocomplete li.active { - background-color: $menu-item-background-active; -} - -.swiftype-widget .autocomplete li span { - line-height: 16px; - margin: 0; - padding: 0; - text-overflow: ellipsis; - overflow-x: hidden; - white-space: nowrap; -} - -.swiftype-widget .autocomplete li span.swiftype-auto-result-title{ - font-weight: bold; - color: $blue-darker; - overflow: hidden; - display: block; -} - -.swiftype-widget .autocomplete li span.swiftype-auto-result-detail{ - color: $lightgray; - overflow: hidden; - display: block; -} - - -.swiftype-widget .autocomplete li span.swiftype-auto-result-title em { - color: #0b2644; - font-style: normal; - font-weight: bold; -} - -.swiftype-widget .autocomplete li.active span.swiftype-auto-result-title{ - color: $menu-item-color-active; -} diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_utility-bar.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_utility-bar.scss index de2781d648..7761717936 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_utility-bar.scss +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_utility-bar.scss @@ -33,6 +33,22 @@ nav#utility-bar { } } } + + } + + button#swiftype-search-magnifying-icon { + border: 1px solid $border; + background-color: $sidebar-gray; + border-radius: $border-radius-base; + padding: .5rem; + margin: .25rem; + &:hover { + color: $blue-darker; + } + #swiftype-search-search-text{ + min-width: 170px; + display: inline-block; + } } button.utility-bar-nav-bars { diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_version_selector.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_version_selector.scss new file mode 100644 index 0000000000..d6bd62c704 --- /dev/null +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_version_selector.scss @@ -0,0 +1,28 @@ +.version-select { + margin-left: .5rem; + margin-bottom: 1rem; + &-label { + font-weight: bold; + } + &-menu { + li.version-select-menu-parent.is-dropdown-submenu-parent { + width: 100%; + border: 1px solid $border-dark; + border-radius: $border-radius-base; + margin-top: 10px; + + a, a::after { + font-size: .8rem; + color: $charcoal; + font-weight: 600; + border-color: $charcoal transparent transparent; + } + + >ul.version-selector-submenu { + width: 100%; + border: 1px solid $border-dark; + border-radius: 0 0 $border-radius-base $border-radius-base; + } + } + } +} diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/typography/_prose.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/typography/_prose.scss index 627a7a1359..415696345d 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/sass/typography/_prose.scss +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/typography/_prose.scss @@ -54,31 +54,6 @@ margin-top: 1rem; } } - #chef-product-version-dropdown{ - margin: -12px 0 26px 0; - &-label { - display: inline-block; - font-style: bold; - font-size: 1.25rem; - } - &-select { - display: inline-block; - width: auto; - border-radius: $border-radius-base; - } - } - .chef-product-version{ - &-not-newest{ - background-color: $ash; - padding: 1rem; - margin: 1.5rem; - border: 1px solid lightgray; - border-radius: $border-radius-base; - p { - margin: 0; - } - } - } } .responsive-table { diff --git a/_vendor/github.com/chef/chef-docs-theme/layouts/_default/baseof.html b/_vendor/github.com/chef/chef-docs-theme/layouts/_default/baseof.html index fb1007cd8e..f6361e4c4f 100644 --- a/_vendor/github.com/chef/chef-docs-theme/layouts/_default/baseof.html +++ b/_vendor/github.com/chef/chef-docs-theme/layouts/_default/baseof.html @@ -44,8 +44,6 @@
    {{ partial .Params.toc_layout . }}
    - {{ else if (.Params.version_docs_product)}} - {{ partial "versioned-docs-toc" . }} {{ else }}
    {{ partial "table-of-contents" . }} diff --git a/_vendor/github.com/chef/chef-docs-theme/layouts/_default/data-api.html b/_vendor/github.com/chef/chef-docs-theme/layouts/_default/data-api.html index f49d1c697b..073f212c33 100644 --- a/_vendor/github.com/chef/chef-docs-theme/layouts/_default/data-api.html +++ b/_vendor/github.com/chef/chef-docs-theme/layouts/_default/data-api.html @@ -3,6 +3,7 @@ {{- with .Params.description -}} + {{- end -}} {{.Title}} @@ -18,7 +19,7 @@ {{ if eq $.Page.Params.title "Chef Automate API" }} -
    +
    Return to Docs @@ -32,7 +33,7 @@
    {{ else }} - Return to Docs + Return to Docs {{ end }} {{ $redocJs := resources.Get "redoc/bundles/redoc.standalone.js" }} diff --git a/_vendor/github.com/chef/chef-docs-theme/layouts/_default/search.html b/_vendor/github.com/chef/chef-docs-theme/layouts/_default/search.html new file mode 100644 index 0000000000..df9a976633 --- /dev/null +++ b/_vendor/github.com/chef/chef-docs-theme/layouts/_default/search.html @@ -0,0 +1,88 @@ +{{ define "main" }} + +{{ $defaultSearchKeys := delimit .Site.Params.search.default_search_product_keys `", "` }} + +{{ end }} diff --git a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/javascript.html b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/javascript.html index 5b4e543e9b..983bee4d96 100644 --- a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/javascript.html +++ b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/javascript.html @@ -25,9 +25,8 @@ {{- $imageModal := resources.Get "js/image-modal.js" -}} {{- $inspecFilter := resources.Get "js/inspec-filter.js" -}} {{- $resourceNote := resources.Get "js/resource-note.js" -}} -{{- $versionDocs := resources.Get "js/version-docs.js" -}} -{{- $customJs := slice $copycodebutton $chefHugo $inspecFilter $resourceNote $versionDocs $feedback $imageModal -}} +{{- $customJs := slice $copycodebutton $chefHugo $inspecFilter $resourceNote $feedback $imageModal -}} {{ if hugo.Environment | eq "development" }} {{- $customJs = $customJs | resources.Concat "js/custom-bundle.js" -}} diff --git a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/on_canvas_top_bar.html b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/on_canvas_top_bar.html new file mode 100644 index 0000000000..d11f8cfdae --- /dev/null +++ b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/on_canvas_top_bar.html @@ -0,0 +1,7 @@ +{{ if .Site.Params.version_selector }} +
    +
    + {{ partial "version_selector" . }} +
    +
    +{{ end }} \ No newline at end of file diff --git a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/range_menu.html b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/range_menu.html index 58e1194bf4..fb3ab10d18 100644 --- a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/range_menu.html +++ b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/range_menu.html @@ -64,4 +64,4 @@ {{ end }} {{ end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/sidebar-off-canvas.html b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/sidebar-off-canvas.html index 11744c7b65..5688877aed 100644 --- a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/sidebar-off-canvas.html +++ b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/sidebar-off-canvas.html @@ -2,35 +2,39 @@
    +{{ end }} \ No newline at end of file diff --git a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/swiftype_search_modal.html b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/swiftype_search_modal.html index 8a0d9040e5..d2ffea390b 100644 --- a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/swiftype_search_modal.html +++ b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/swiftype_search_modal.html @@ -1,85 +1,21 @@
    -
    -
    - -
    -
    -
    -
    - -
    - -
    -
      -
    • - -
      -
    • -
    • - -
      -
    • -
    • - -
      -
    • -
    • - -
      -
    • -
    • - -
      -
        -
      • - -
        -
      • -
      • - -
        -
      • -
      -
    • -
    • - -
      -
    • -
    • - -
      -
    • -
    • - -
      -
    • -
    • - -
      -
    • -
    -
    -
    - -
    -

    Search Results

    -
      -
    -
    -
    -
    diff --git a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/utility-bar.html b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/utility-bar.html index d0bda0734f..0f8b5bbe26 100644 --- a/_vendor/github.com/chef/chef-docs-theme/layouts/partials/utility-bar.html +++ b/_vendor/github.com/chef/chef-docs-theme/layouts/partials/utility-bar.html @@ -1,20 +1,26 @@ -
    diff --git a/content/reusable/md/handler_type_start.md b/content/reusable/md/handler_type_start.md index 20a0dec420..d8eecd40f8 100644 --- a/content/reusable/md/handler_type_start.md +++ b/content/reusable/md/handler_type_start.md @@ -1,4 +1,4 @@ -A start handler is not loaded into a Chef Infra Client run from a +A start handler isn't loaded into a Chef Infra Client run from a recipe, but is instead listed in the client.rb file using the `start_handlers` attribute. The start handler must be installed on the node and be available to Chef Infra Client before the start of a Chef @@ -9,7 +9,7 @@ Start handlers are made available to a Chef Infra Client run in one of the following ways: - By adding a start handler to the **chef-client** cookbook, which - installs the handler on the node so that it is available to Chef + installs the handler on the node so that it's available to Chef Infra Client at the start of a Chef Infra Client run - By adding the handler to one of the following settings in the node's client.rb file: `start_handlers` diff --git a/content/reusable/md/infra_lang_method_registry_value_exists_syntax.md b/content/reusable/md/infra_lang_method_registry_value_exists_syntax.md index 1592b9c7c5..7d45a7a7e7 100644 --- a/content/reusable/md/infra_lang_method_registry_value_exists_syntax.md +++ b/content/reusable/md/infra_lang_method_registry_value_exists_syntax.md @@ -19,7 +19,7 @@ where: `HKEY_USERS`, `HKU`, `HKEY_CURRENT_USER`, and `HKCU`. - `{ name: 'NAME' }` is a hash that contains the name of the registry key value; if either `type:` or `:value` are specified in the hash, - they are ignored + they're ignored - `type:` represents the values available for registry keys in Windows. Use `:binary` for REG_BINARY, `:string` for REG_SZ, `:multi_string` for REG_MULTI_SZ, `:expand_string` for diff --git a/content/reusable/md/infra_lang_summary.md b/content/reusable/md/infra_lang_summary.md index a147a682f6..8cf352b8ef 100644 --- a/content/reusable/md/infra_lang_summary.md +++ b/content/reusable/md/infra_lang_summary.md @@ -1 +1 @@ -The Chef Infra Language is a comprehensive systems configuration language with resources and helpers for configuring operating systems. The language is primarily used in Chef Infra recipes and custom resources to tell the Chef Infra Client what action(s) to take to configure a system. The Chef Infra Language provides resources for system-level components such as packages, users, or firewalls, and it also includes helpers to allow you to make configuration decisions based on operating systems, clouds, virtualization hypervisors, and more. +The Chef Infra Language is a comprehensive systems configuration language with resources and helpers for configuring operating systems. The language is primarily used in Chef Infra recipes and custom resources to tell the Chef Infra Client what actions to take to configure a system. The Chef Infra Language provides resources for system-level components such as packages, users, or firewalls, and it also includes helpers to allow you to make configuration decisions based on operating systems, clouds, virtualization hypervisors, and more. diff --git a/content/reusable/md/install_chef_client.md b/content/reusable/md/install_chef_client.md index 6502d18a16..0b807a0735 100644 --- a/content/reusable/md/install_chef_client.md +++ b/content/reusable/md/install_chef_client.md @@ -10,7 +10,7 @@ including an embedded version of Ruby, OpenSSL, parsers, libraries, and command line utilities. The Chef Infra Client installer puts everything into a unique directory -(`/opt/chef/`) so that Chef Infra Client will not interfere with other +(`/opt/chef/`) so that Chef Infra Client won't interfere with other applications that may be running on the target machine. Once installed, Chef Infra Client requires a few more configuration steps before it can perform its first Chef Infra Client run on a node. diff --git a/content/reusable/md/libraries_summary.md b/content/reusable/md/libraries_summary.md index bcb802116e..c31b8fbc97 100644 --- a/content/reusable/md/libraries_summary.md +++ b/content/reusable/md/libraries_summary.md @@ -1,7 +1,7 @@ A library allows arbitrary Ruby code to be included in a cookbook. The most common use for libraries is to write helpers that are used throughout recipes and custom resources. A library file is a Ruby file -that is located within a cookbook's `/libraries` directory. Because a +that's located within a cookbook's `/libraries` directory. Because a library is built using Ruby, anything that can be done with Ruby can be done in a library file, including advanced functionality such as extending built-in Chef classes. diff --git a/content/reusable/md/node.md b/content/reusable/md/node.md index 7d0b8843a2..51234295ac 100644 --- a/content/reusable/md/node.md +++ b/content/reusable/md/node.md @@ -1,2 +1,2 @@ A node is any device---physical, virtual, cloud, network device, -etc.---that is under management by Chef Infra. +etc.---that's under management by Chef Infra. diff --git a/content/reusable/md/node_attribute.md b/content/reusable/md/node_attribute.md index 8d745ad376..2bccdf5f19 100644 --- a/content/reusable/md/node_attribute.md +++ b/content/reusable/md/node_attribute.md @@ -16,7 +16,7 @@ During every Chef Infra Client run, Chef Infra Client builds the attribute list - Attributes passed using JSON on the command line - Data about the node collected by [Ohai](/ohai.html). - The node object that was saved to the Chef Infra Server at the end of the previous Chef Infra Client run. -- The rebuilt node object from the current Chef Infra Client run, after it is updated for changes to cookbooks (attribute files and/or recipes) and/or Policyfiles, and updated for any changes to the state of the node itself. +- The rebuilt node object from the current Chef Infra Client run, after it's updated for changes to cookbooks (attribute files and/or recipes) and/or Policyfiles, and updated for any changes to the state of the node itself. After the node object is rebuilt, all of the attributes are compared, and then the node is updated based on attribute precedence. At the end of every Chef Infra Client run, the node object that defines the current state of the node is uploaded to the Chef Infra Server so that it can be indexed for search. diff --git a/content/reusable/md/node_attribute_allowlist.md b/content/reusable/md/node_attribute_allowlist.md index f004668ba7..8da8fb9e38 100644 --- a/content/reusable/md/node_attribute_allowlist.md +++ b/content/reusable/md/node_attribute_allowlist.md @@ -22,7 +22,7 @@ Attributes are allowlisted by attribute type, with each attribute type being all #### Allowlisting Ohai (automatic) attributes -The recommended practice is to use `allowed_automatic_attributes` to allow specific attributes populated by Ohai's system information gathering. Ohai gathers a large number of attributes that can consume a significant amount of storage space on the Chef Infra Server. Many of these attributes may be considered highly valuable, while others could be skipped without any impact to data available in search. Normal, default, and override attributes are typically much more important attributes used within cookbooks and are more likely to cause issues if they are omitted from an allowlist incorrectly. +The recommended practice is to use `allowed_automatic_attributes` to allow specific attributes populated by Ohai's system information gathering. Ohai gathers a large number of attributes that can consume a significant amount of storage space on the Chef Infra Server. Many of these attributes may be considered highly valuable, while others could be skipped without any impact to data available in search. Normal, default, and override attributes are typically much more important attributes used within cookbooks and are more likely to cause issues if they're omitted from an allowlist incorrectly. For example, automatic attribute data similar to: @@ -51,7 +51,7 @@ To allowlist the `network` attributes and prevent the other attributes from bein allowed_automatic_attributes ['network/interfaces/'] ``` -When a allowlist is defined, any attribute of that type that is not specified in that attribute allowlist **will not** be saved. So based on the previous allowlist for automatic attributes, the `filesystem` and `map - autohome` attributes will not be saved, but the `network` attributes will. +When a allowlist is defined, any attribute of that type that isn't specified in that attribute allowlist **won't** be saved. So based on the previous allowlist for automatic attributes, the `filesystem` and `map - autohome` attributes won't be saved, but the `network` attributes will. Leave the value empty to prevent all attributes of that attribute type from being saved: diff --git a/content/reusable/md/node_attribute_allowlist_warning.md b/content/reusable/md/node_attribute_allowlist_warning.md index 3473aa78c1..29881cf8e4 100644 --- a/content/reusable/md/node_attribute_allowlist_warning.md +++ b/content/reusable/md/node_attribute_allowlist_warning.md @@ -1,2 +1,2 @@ -When attribute allowlist settings are used, only the attributes defined in a allowlist will be saved and any attribute that is not defined in a allowlist will not be saved. Each attribute type is allowlisted independently of the other attribute types. For example, if `automatic_attribute_allowlist` defines attributes to be saved, but `normal_attribute_allowlist`, `default_attribute_allowlist`, and -`override_attribute_allowlist` are not defined, then all normal attributes, default attributes, and override attributes are saved, as well as the automatic attributes that were specifically included through allowlisting. +When attribute allowlist settings are used, only the attributes defined in a allowlist will be saved and any attribute that isn't defined in a allowlist won't be saved. Each attribute type is allowlisted independently of the other attribute types. For example, if `automatic_attribute_allowlist` defines attributes to be saved, but `normal_attribute_allowlist`, `default_attribute_allowlist`, and +`override_attribute_allowlist` aren't defined, then all normal attributes, default attributes, and override attributes are saved, as well as the automatic attributes that were specifically included through allowlisting. diff --git a/content/reusable/md/node_attribute_blocklist_warning.md b/content/reusable/md/node_attribute_blocklist_warning.md index 9855ca8af8..04813c5a89 100644 --- a/content/reusable/md/node_attribute_blocklist_warning.md +++ b/content/reusable/md/node_attribute_blocklist_warning.md @@ -1 +1 @@ -When attribute blocklist settings are used, any attribute defined in a blocklist will not be saved to the Chef Infra Server and any attribute that is not defined in a blocklist will be saved. Each attribute type must be blocklisted independently of the other attribute types. For example, if `blocked_automatic_attributes` defines attributes that will not be saved, but `blocked_normal_attributes`, `blocked_default_attributes`, and `blocked_override_attributes` are not defined, then all normal attributes, default attributes, and override attributes will be saved, as well as the automatic attributes that were not specifically excluded through blocklisting. +When attribute blocklist settings are used, any attribute defined in a blocklist won't be saved to the Chef Infra Server and any attribute that isn't defined in a blocklist will be saved. Each attribute type must be blocklisted independently of the other attribute types. For example, if `blocked_automatic_attributes` defines attributes that won't be saved, but `blocked_normal_attributes`, `blocked_default_attributes`, and `blocked_override_attributes` aren't defined, then all normal attributes, default attributes, and override attributes will be saved, as well as the automatic attributes that weren't specifically excluded through blocklisting. diff --git a/content/reusable/md/node_attribute_type_automatic.md b/content/reusable/md/node_attribute_type_automatic.md index 2eeb2ce9b4..fb6f40ae87 100644 --- a/content/reusable/md/node_attribute_type_automatic.md +++ b/content/reusable/md/node_attribute_type_automatic.md @@ -1,3 +1,3 @@ -An `automatic` attribute contains data that is identified by Ohai at the +An `automatic` attribute contains data that's identified by Ohai at the beginning of every Chef Infra Client run. An `automatic` attribute -cannot be modified and always has the highest attribute precedence. +can't be modified and always has the highest attribute precedence. diff --git a/content/reusable/md/node_ctl_attribute.md b/content/reusable/md/node_ctl_attribute.md index 88931fd123..44f4581333 100644 --- a/content/reusable/md/node_ctl_attribute.md +++ b/content/reusable/md/node_ctl_attribute.md @@ -1,6 +1,6 @@ -Any other attribute type that is contained in this JSON file will be +Any other attribute type that's contained in this JSON file will be treated as a `normal` attribute. Setting attributes at other precedence -levels is not possible. For example, attempting to update `override` +levels isn't possible. For example, attempting to update `override` attributes using the `-j` option: ```json diff --git a/content/reusable/md/node_run_list.md b/content/reusable/md/node_run_list.md index c8230b9135..b47872f2ca 100644 --- a/content/reusable/md/node_run_list.md +++ b/content/reusable/md/node_run_list.md @@ -3,9 +3,9 @@ configure a node into the desired state. A run-list is: - An ordered list of roles and/or recipes that are run in the exact order defined in the run-list; if a recipe appears more than once in - the run-list, Chef Infra Client will not run it twice + the run-list, Chef Infra Client won't run it twice - Always specific to the node on which it runs; nodes may have a - run-list that is identical to the run-list used by other nodes + run-list that's identical to the run-list used by other nodes - Stored as part of the node object on the Chef server - Maintained using knife and then uploaded from the workstation to the Chef Infra Server, or maintained using Chef Automate diff --git a/content/reusable/md/node_types.md b/content/reusable/md/node_types.md index f41e51e4aa..15e1702d52 100644 --- a/content/reusable/md/node_types.md +++ b/content/reusable/md/node_types.md @@ -1,4 +1,4 @@ -The types of nodes that can be managed by Chef include, but are not +The types of nodes that can be managed by Chef include, but aren't limited to, the following: diff --git a/content/reusable/md/notes_registry_key_not_if_only_if.md b/content/reusable/md/notes_registry_key_not_if_only_if.md index 5da2d3f003..9934277c1e 100644 --- a/content/reusable/md/notes_registry_key_not_if_only_if.md +++ b/content/reusable/md/notes_registry_key_not_if_only_if.md @@ -1,4 +1,4 @@ This method can be used in recipes and from within the `not_if` and -`only_if` blocks in resources. This method is not designed to create or +`only_if` blocks in resources. This method isn't designed to create or modify a registry key. If a registry key needs to be modified, use the **registry_key** resource. diff --git a/content/reusable/md/notes_resource_based_on_package.md b/content/reusable/md/notes_resource_based_on_package.md index 159b9c4f58..65f1f0f0ae 100644 --- a/content/reusable/md/notes_resource_based_on_package.md +++ b/content/reusable/md/notes_resource_based_on_package.md @@ -1,4 +1,4 @@ -In many cases, it is better to use the **package** resource instead of +In many cases, it's better to use the **package** resource instead of this one. This is because when the **package** resource is used in a recipe, Chef Infra Client will use details that are collected by Ohai at the start of a Chef Infra Client run to determine the correct package diff --git a/content/reusable/md/ohai_automatic_attribute.md b/content/reusable/md/ohai_automatic_attribute.md index 8fefc9fdf3..b05e89e531 100644 --- a/content/reusable/md/ohai_automatic_attribute.md +++ b/content/reusable/md/ohai_automatic_attribute.md @@ -1,7 +1,7 @@ An automatic attribute is a specific detail about a node, such as an IP -address, a host name, a list of loaded kernel modules, and so on. +address, a host name, or a list of loaded kernel modules. Automatic attributes are detected by Ohai and are then used by Chef -Infra Client to ensure that they are handled properly during every Chef +Infra Client to ensure that they're handled properly during every Chef Infra Client run. The most commonly accessed automatic attributes are: @@ -30,7 +30,7 @@ Infra Client run. The most commonly accessed automatic attributes are: - + @@ -58,7 +58,7 @@ Infra Client run. The most commonly accessed automatic attributes are: - +
    node['ipaddress']The IP address for a node. If the node has a default route, this is the IPV4 address for the interface. If the node does not have a default route, the value for this attribute should be nil. The IP address for default route is the recommended default value.The IP address for a node. If the node has a default route, this is the IPV4 address for the interface. If the node doesn't have a default route, the value for this attribute should be nil. The IP address for default route is the recommended default value.
    node['macaddress']
    node['ohai_time']The time at which Ohai was last run. This attribute is not commonly used in recipes, but it is saved to the Chef Infra Server and can be accessed using the knife status subcommand.The time at which Ohai was last run. This attribute isn't commonly used in recipes, but it's saved to the Chef Infra Server and can be accessed using the knife status subcommand.
    diff --git a/content/reusable/md/ohai_summary.md b/content/reusable/md/ohai_summary.md index 8b64b6224e..4fa11884e4 100644 --- a/content/reusable/md/ohai_summary.md +++ b/content/reusable/md/ohai_summary.md @@ -1,6 +1,6 @@ Ohai is a tool for collecting system configuration data, which it then provides to Chef Infra Client to use in cookbooks. Chef Infra Client runs Ohai at the start of every Chef Infra run to determine system state. The attributes that Ohai collects are called `automatic attributes`. Chef Infra Client uses these attributes to ensure that nodes are in the desired state after each configuration run. -The types of attributes Ohai collects include but are not limited to: +The types of attributes Ohai collects include but aren't limited to: - Operating System - Network diff --git a/content/reusable/md/plugin_knife_summary.md b/content/reusable/md/plugin_knife_summary.md index 942da18f4b..c03b482d4f 100644 --- a/content/reusable/md/plugin_knife_summary.md +++ b/content/reusable/md/plugin_knife_summary.md @@ -1,5 +1,5 @@ A knife plugin is a set of one (or more) subcommands that can be added -to knife to support additional functionality that is not built-in to the +to knife to support additional functionality that isn't built-in to the base set of knife subcommands. Many of the knife plugins are built by members of the Chef community and several of them are built and maintained by Chef. diff --git a/content/reusable/md/policyfile_lock_json.md b/content/reusable/md/policyfile_lock_json.md index 08a48aee9b..1a36e30a49 100644 --- a/content/reusable/md/policyfile_lock_json.md +++ b/content/reusable/md/policyfile_lock_json.md @@ -8,5 +8,5 @@ describes: - Attributes included with the Policyfile A `Policyfile.lock.json` file is associated with a specific policy -group, which means it is associated with one (or more) nodes that use the same +group, which means it's associated with one (or more) nodes that use the same revision of a given policy. diff --git a/content/reusable/md/policyfile_rb.md b/content/reusable/md/policyfile_rb.md index c9ffb92c7d..8d56ae2a32 100644 --- a/content/reusable/md/policyfile_rb.md +++ b/content/reusable/md/policyfile_rb.md @@ -1,6 +1,6 @@ A Policyfile file allows you to specify in a single document the cookbook revisions and recipes that Chef Infra Client will apply. A -Policyfile file is uploaded to the Chef Infra Server, where it is +Policyfile file is uploaded to the Chef Infra Server, where it's associated with a group of nodes. When these nodes are configured during a Chef Infra Client run, Chef Infra Client will make decisions based on your Policyfile settings and will build a run-list based on that diff --git a/content/reusable/md/policyfile_rb_settings.md b/content/reusable/md/policyfile_rb_settings.md index ded1a20b31..592985f22f 100644 --- a/content/reusable/md/policyfile_rb_settings.md +++ b/content/reusable/md/policyfile_rb_settings.md @@ -6,7 +6,7 @@ A `Policyfile.rb` file may contain the following settings: : Required. The name of the policy. Use a name that reflects the purpose of the machines against which the policy will run, - such as "application server", "chat server", "load balancer", and so on. + such as _application server_, _chat server_, or _load balancer_. `run_list "ITEM", "ITEM", ...` @@ -79,12 +79,12 @@ A `Policyfile.rb` file may contain the following settings:

    Note

    - If a run-list or any dependencies require a cookbook that is present + If a run-list or any dependencies require a cookbook that's present in more than one source, be explicit about which source is preferred. This will ensure that a cookbook is always pulled from an expected source. For example, an internally-developed cookbook named `chef-client` will conflict with the public `chef-client` cookbook - that is maintained by Chef. To specify a named source for a + that's maintained by Chef. To specify a named source for a cookbook: ```ruby @@ -157,50 +157,50 @@ A `Policyfile.rb` file may contain the following settings: `include_policy "NAME", *args` -: Specify a policyfile lock to be merged with this policy. Chef +: Specify a Policyfile lock to be merged with this policy. Chef Workstation supports pulling this lock from a local or remote file, from a Chef Infra Server, or from a git repository. When the - policyfile lock is included, its run-list will appear before the - current policyfile's run-list. This setting requires that the solved - cookbooks appear as-is from the included policyfile lock. If + Policyfile lock is included, its run-list will appear before the + current Policyfile's run-list. This setting requires that the solved + cookbooks appear as-is from the included Policyfile lock. If conflicting attributes or cookbooks are provided, an error will be presented. See [RFC097](https://github.com/chef-boneyard/chef-rfc/blob/master/rfc097-policyfile-includes.md) for the full specifications of this feature. - Pull the policyfile lock from `./NAME.lock.json`: + Pull the Policyfile lock from `./NAME.lock.json`: ```ruby include_policy 'NAME', path: '.' ``` - Pull the policyfile lock from `./foo.lock.json`. + Pull the Policyfile lock from `./foo.lock.json`. ```ruby include_policy 'NAME', path: './foo.lock.json' ``` - Pull the policyfile lock `foo.lock.json` from the `example/foo` Git repository on the `git.example.com` Git server. + Pull the Policyfile lock `foo.lock.json` from the `example/foo` Git repository on the `git.example.com` Git server. ```ruby include_policy 'NAME', git: 'https://git.example.com/example/foo', path: 'foo.lock.json' ``` - Pull the policyfile lock from `./bar.lock.json` with revision ID + Pull the Policyfile lock from `./bar.lock.json` with revision ID 'revision1'. ```ruby include_policy 'NAME', policy_revision_id: 'revision1', path: './bar.lock.json' ``` - Pull the policyfile lock from a remote server + Pull the Policyfile lock from a remote server `https://internal.example.com/foo.lock.json`. ```ruby include_policy 'NAME', remote: 'https://internal.example.com/foo.lock.json' ``` - Pull the policyfile lock from a remote server + Pull the Policyfile lock from a remote server `https://internal.example.com/bar.lock.json` and with revision ID 'revision1'. diff --git a/content/reusable/md/policyfile_summary.md b/content/reusable/md/policyfile_summary.md index 7130fe4e8d..a61bde1dc2 100644 --- a/content/reusable/md/policyfile_summary.md +++ b/content/reusable/md/policyfile_summary.md @@ -1 +1 @@ -A Policyfile is a way to create immutable collections of cookbooks, cookbook dependencies, and attributes defined in a single document that is uploaded to the Chef Infra Server. The Policyfile is then associated with a group of nodes. When these nodes perform a Chef Infra Client run, they utilize recipes specified in the Policyfile. +A Policyfile is a way to create immutable collections of cookbooks, cookbook dependencies, and attributes defined in a single document that's uploaded to the Chef Infra Server. The Policyfile is then associated with a group of nodes. When these nodes perform a Chef Infra Client run, they utilize recipes specified in the Policyfile. diff --git a/content/reusable/md/release_channels.md b/content/reusable/md/release_channels.md index ed3da0fa65..cb0a5f1d0b 100644 --- a/content/reusable/md/release_channels.md +++ b/content/reusable/md/release_channels.md @@ -3,6 +3,6 @@ Chef releases packages from the following release channels: | Channel | Description | |--- |--- | | `stable` | A build from this channel is an "official" release that has passed full user acceptance testing. Artifacts in this channel are retained indefinitely. | -| `current`| A build from this channel is an "integration" build that has passed full testing, but has not been officially released. Artifacts in this channel are retained for 30 days and then removed automatically. | +| `current`| A build from this channel is an "integration" build that has passed full testing, but hasn't been officially released. Artifacts in this channel are retained for 30 days and then removed automatically. | Use the stable channel when installing Chef products on production systems. diff --git a/content/reusable/md/remote_directory_recursive_directories.md b/content/reusable/md/remote_directory_recursive_directories.md index 506149a957..ce931574a8 100644 --- a/content/reusable/md/remote_directory_recursive_directories.md +++ b/content/reusable/md/remote_directory_recursive_directories.md @@ -1,6 +1,6 @@ The **remote_directory** resource can be used to recursively create the path outside of remote directory structures, but the permissions of -those outside paths are not managed. This is because the `recursive` +those outside paths aren't managed. This is because the `recursive` attribute only applies `group`, `mode`, and `owner` attribute values to the remote directory itself and any inner directories the resource copies. @@ -27,7 +27,7 @@ end But with this example, the `group`, `mode`, and `owner` attribute values will only be applied to `/baz`. Which is fine, if that's what you want. But most of the time, when the entire `/foo/bar/baz` directory structure -is not there, you must be explicit about each directory. For example: +isn't there, you must be explicit about each directory. For example: ```ruby %w( /foo /foo/bar /foo/bar/baz ).each do |path| diff --git a/content/reusable/md/remote_directory_recursive_directories_example.md b/content/reusable/md/remote_directory_recursive_directories_example.md index 11ca702a92..97d446cd82 100644 --- a/content/reusable/md/remote_directory_recursive_directories_example.md +++ b/content/reusable/md/remote_directory_recursive_directories_example.md @@ -1,7 +1,7 @@ This section contains a more detailed example of how Chef Infra Client manages recursive directory structures: -- A cookbook named `cumbria` that is used to build a website +- A cookbook named `cumbria` that's used to build a website - A subfolder in the `/files/default` directory named `/website` - A file named `index.html`, which is the root page for the website - Directories within `/website` named `/cities`, `/places`, and diff --git a/content/reusable/md/remote_file_prevent_re_downloads.md b/content/reusable/md/remote_file_prevent_re_downloads.md index e8c93011f9..1a4a9594da 100644 --- a/content/reusable/md/remote_file_prevent_re_downloads.md +++ b/content/reusable/md/remote_file_prevent_re_downloads.md @@ -10,7 +10,7 @@ present on a node, use one of the following attributes in a recipe: re-download the file. - The `checksum` attribute will ask Chef Infra Client to compare the checksum for the local file to the one at the remote location. If - they match, Chef Infra Client will not re-download the file. Using a + they match, Chef Infra Client won't re-download the file. Using a local checksum for comparison requires that the local checksum be the correct checksum. diff --git a/content/reusable/md/remote_file_unc_path.md b/content/reusable/md/remote_file_unc_path.md index 6e0ca50ef9..d607a1ae4c 100644 --- a/content/reusable/md/remote_file_unc_path.md +++ b/content/reusable/md/remote_file_unc_path.md @@ -1,20 +1,20 @@ The `remote_file` resource on Windows supports accessing files from a remote SMB/CIFS share. The file name should be specified in the source -property as a UNC path e.g. `\myserver\myshare\mydirectory\myfile.txt`. +property as a UNC path for example `\myserver\myshare\mydirectory\myfile.txt`. This allows access to the file at that path location even if the Chef -Infra Client process identity does not have permission to access the +Infra Client process identity doesn't have permission to access the file. Credentials for authenticating to the remote system can be specified using the `remote_user`, `remote_domain`, and `remote_password` properties when the user that Chef Infra Client is -running does not have access to the remote file. See the "Properties" +running doesn't have access to the remote file. See the "Properties" section for more details on these options. **Note**: This is primarily for accessing remote files when the user -that Chef Infra Client is running as does not have sufficient access, +that Chef Infra Client is running as doesn't have sufficient access, and alternative credentials need to be specified. If the user already -has access, the credentials do not need to be specified. In a case where +has access, the credentials don't need to be specified. In a case where the local system and remote system are in the same domain, the -`remote_user` and `remote_password` properties often do not need to be +`remote_user` and `remote_password` properties often don't need to be specified, as the user may already have access to the remote file share. Examples: diff --git a/content/reusable/md/resource_before_notification_restart.md b/content/reusable/md/resource_before_notification_restart.md index d5383b1910..4ee995e336 100644 --- a/content/reusable/md/resource_before_notification_restart.md +++ b/content/reusable/md/resource_before_notification_restart.md @@ -9,5 +9,5 @@ end ``` With the `:before` notification, the action specified for the `nginx` -resource will not run until action has been taken on the notified +resource won't run until action has been taken on the notified resource (`php-fpm`). diff --git a/content/reusable/md/resource_chef_gem_gem_package_install.md b/content/reusable/md/resource_chef_gem_gem_package_install.md index 00e67803e2..9b460d06e0 100644 --- a/content/reusable/md/resource_chef_gem_gem_package_install.md +++ b/content/reusable/md/resource_chef_gem_gem_package_install.md @@ -1,5 +1,5 @@ The **chef_gem** and **gem_package** resources are both used to install Ruby gems. For any machine on which Chef Infra Client is -installed, there are two instances of Ruby. One is the standard, system-wide instance of Ruby and the other is a dedicated instance that is +installed, there are two instances of Ruby. One is the standard, system-wide instance of Ruby and the other is a dedicated instance that's available only to Chef Infra Client. -Use the **chef_gem** resource to install gems into the instance of Ruby that is dedicated to Chef Infra Client. -Use the **gem_package** resource to install all other gems (i.e. install gems system-wide). +Use the **chef_gem** resource to install gems into the instance of Ruby that's dedicated to Chef Infra Client. +Use the **gem_package** resource to install all other gems (that is, install gems system-wide). diff --git a/content/reusable/md/resource_cookbook_file_summary.md b/content/reusable/md/resource_cookbook_file_summary.md index 6539eb428b..ea662b8bb3 100644 --- a/content/reusable/md/resource_cookbook_file_summary.md +++ b/content/reusable/md/resource_cookbook_file_summary.md @@ -1,6 +1,6 @@ Use the **cookbook_file** resource to transfer files from a sub-directory of `COOKBOOK_NAME/files/` to a specified path located on a -host that is running Chef Infra Client. The file is selected according +host that's running Chef Infra Client. The file is selected according to file specificity, which allows different source files to be used based on the hostname, host platform (operating system, distro, or as appropriate), or platform version. Files that are located in the diff --git a/content/reusable/md/resource_execute_command_from_template.md b/content/reusable/md/resource_execute_command_from_template.md index 21c18c41f6..e4d8bc7893 100644 --- a/content/reusable/md/resource_execute_command_from_template.md +++ b/content/reusable/md/resource_execute_command_from_template.md @@ -15,7 +15,7 @@ end ``` where the `command` property for the **execute** resource contains the -command that is to be run and the `source` property for the **template** +command that's to be run and the `source` property for the **template** resource specifies which template to use. The `notifies` property for the **template** specifies that the `execute[forward_ipv4]` (which is defined by the **execute** resource) should be queued up and run at the diff --git a/content/reusable/md/resource_package_options_hash.md b/content/reusable/md/resource_package_options_hash.md index 216291025c..d83fe17134 100644 --- a/content/reusable/md/resource_package_options_hash.md +++ b/content/reusable/md/resource_package_options_hash.md @@ -1,4 +1,4 @@ -You should provide the install options as a hash if you are not using an explicit +You should provide the install options as a hash if you aren't using an explicit `gem_binary` parameter with the `gem_package` resource. This approach allows the provider to install the gem without needing to spawn an external gem process. diff --git a/content/reusable/md/resource_service_subscribes_reload_using_template.md b/content/reusable/md/resource_service_subscribes_reload_using_template.md index ac97053850..a4ede04c49 100644 --- a/content/reusable/md/resource_service_subscribes_reload_using_template.md +++ b/content/reusable/md/resource_service_subscribes_reload_using_template.md @@ -1,4 +1,4 @@ -To reload a service that is based on a template, use the **template** +To reload a service that's based on a template, use the **template** and **service** resources together in the same recipe, similar to the following: diff --git a/content/reusable/md/resource_template_notifies_run_immediately.md b/content/reusable/md/resource_template_notifies_run_immediately.md index 9e26833679..02aa12d7c1 100644 --- a/content/reusable/md/resource_template_notifies_run_immediately.md +++ b/content/reusable/md/resource_template_notifies_run_immediately.md @@ -1,5 +1,5 @@ -By default, notifications are `:delayed`, that is they are queued up as -they are triggered, and then executed at the end of a Chef Infra +By default, notifications are `:delayed`, that's they're queued up as +they're triggered, and then executed at the end of a Chef Infra Client run. To run an action immediately, use `:immediately`: ```ruby diff --git a/content/reusable/md/resources_common_actions_nothing.md b/content/reusable/md/resources_common_actions_nothing.md index 403c3a0765..45131b53c5 100644 --- a/content/reusable/md/resources_common_actions_nothing.md +++ b/content/reusable/md/resources_common_actions_nothing.md @@ -1,3 +1,3 @@ -This resource block does not act unless notified by another resource to +This resource block doesn't act unless notified by another resource to take action. Once notified, this resource block either runs immediately or is queued up to run at the end of a Chef Infra Client run. diff --git a/content/reusable/md/resources_common_actions_nothing_default.md b/content/reusable/md/resources_common_actions_nothing_default.md index 7cadac43ef..d92f4fe2b0 100644 --- a/content/reusable/md/resources_common_actions_nothing_default.md +++ b/content/reusable/md/resources_common_actions_nothing_default.md @@ -1,3 +1,3 @@ -This resource block does not act unless notified by another resource to +This resource block doesn't act unless notified by another resource to take action. Once notified, this resource block either runs immediately or is queued up to run at the end of a Chef Infra Client run. (default) diff --git a/content/reusable/md/resources_common_atomic_update.md b/content/reusable/md/resources_common_atomic_update.md index 75022e6b35..3136dc9739 100644 --- a/content/reusable/md/resources_common_atomic_update.md +++ b/content/reusable/md/resources_common_atomic_update.md @@ -5,7 +5,7 @@ runs out. Atomic updates are enabled by default. They can be managed globally using the `file_atomic_update` setting in the `client.rb` file. They can be managed for each resource using the `atomic_update` property -that is available with the **cookbook_file**, **file**, +that's available with the **cookbook_file**, **file**, **remote_file**, and **template** resources. diff --git a/content/reusable/md/resources_common_compile.md b/content/reusable/md/resources_common_compile.md index 50490f88dc..fc67342d5d 100644 --- a/content/reusable/md/resources_common_compile.md +++ b/content/reusable/md/resources_common_compile.md @@ -12,7 +12,7 @@ Chef Infra Client processes recipes in two phases: action. This is also referred to as the "execution phase". Typically, actions are processed during the execution phase of a Chef -Infra Client run. However, sometimes it is necessary to run an action +Infra Client run. However, sometimes it's necessary to run an action during the compile phase. For example, a resource can be configured to install a package during the compile phase to ensure that application is available to other resources during the execution phase. diff --git a/content/reusable/md/resources_common_compile_begin.md b/content/reusable/md/resources_common_compile_begin.md index 7142fcb9a8..399f6006db 100644 --- a/content/reusable/md/resources_common_compile_begin.md +++ b/content/reusable/md/resources_common_compile_begin.md @@ -98,7 +98,7 @@ to download the file during compile time: This is considerably cleaner than the alternative of lazy evaluating both the parsing of the JSON and the rendering of the data into the file template, which will happen if -the `remote_file` resource is not run at compile time: +the `remote_file` resource isn't run at compile time: ```ruby # the execution of this is now deferred @@ -106,7 +106,7 @@ the `remote_file` resource is not run at compile time: source "https://jsonplaceholder.typicode.com/users" end - # it is necessary due to lexical scoping issues to create this variable here + # it's necessary due to lexical scoping issues to create this variable here array = nil # the parsing of the JSON is now deferred due to the ruby_block @@ -125,9 +125,9 @@ the `remote_file` resource is not run at compile time: This is an example of code that overuses deferred execution, uses more "lazy" evaluation, and is considerably harder to understand and write correctly. -**Notifications will not work** +**Notifications won't work** -Resources that are executed during the compile phase cannot notify other +Resources that are executed during the compile phase can't notify other resources. For example: ```ruby @@ -140,7 +140,7 @@ end ``` A better approach in this type of situation is to install the package -before the resource collection is built to ensure that it is available +before the resource collection is built to ensure that it's available to other resources later on. The best approach to this problem is to use [`unified mode`](/unified_mode/), which eliminates diff --git a/content/reusable/md/resources_common_guard_interpreter_attributes_inherit.md b/content/reusable/md/resources_common_guard_interpreter_attributes_inherit.md index ebfd72d5b6..ac38d4e33c 100644 --- a/content/reusable/md/resources_common_guard_interpreter_attributes_inherit.md +++ b/content/reusable/md/resources_common_guard_interpreter_attributes_inherit.md @@ -1,7 +1,7 @@ The `guard_interpreter` property is set to `:default` by default for the **bash**, **csh**, **perl**, **python**, and **ruby** resources. When the `guard_interpreter` property is set to `:default`, `not_if` or -`only_if` guard statements **do not inherit** properties that are +`only_if` guard statements **don't inherit** properties that are defined by the **script**-based resource. @@ -19,7 +19,7 @@ respectively.
    For example, the `not_if` guard statement in the following resource -example **does not inherit** the `environment` property: +example **doesn't inherit** the `environment` property: ```ruby bash 'javatooling' do diff --git a/content/reusable/md/resources_common_guards.md b/content/reusable/md/resources_common_guards.md index 3e606d0e70..353fcd2bc0 100644 --- a/content/reusable/md/resources_common_guards.md +++ b/content/reusable/md/resources_common_guards.md @@ -6,14 +6,14 @@ a string value or a Ruby block value: - A string is executed as a shell command. If the command returns `0`, the guard is applied. If the command returns any other value, then - the guard property is not applied. String guards in a + the guard property isn't applied. String guards in a **powershell_script** run Windows PowerShell commands and may return `true` in addition to `0`. - A block is executed as Ruby code that must return either `true` or `false`. If the block returns `true`, the guard property is applied. - If the block returns `false`, the guard property is not applied. + If the block returns `false`, the guard property isn't applied. A guard property is useful for ensuring that a resource is idempotent by -allowing that resource to test for the desired state as it is being +allowing that resource to test for the desired state as it's being executed, and then if the desired state is present, for Chef Infra -Client to do nothing. +Client to don'thing. diff --git a/content/reusable/md/resources_common_guards_properties.md b/content/reusable/md/resources_common_guards_properties.md index b0a745fa86..3e176d2914 100644 --- a/content/reusable/md/resources_common_guards_properties.md +++ b/content/reusable/md/resources_common_guards_properties.md @@ -1,4 +1,4 @@ -The following properties can be used to define a guard that is evaluated +The following properties can be used to define a guard that's evaluated during the execution phase of a Chef Infra Client run: `not_if` diff --git a/content/reusable/md/resources_common_lazy_evaluation.md b/content/reusable/md/resources_common_lazy_evaluation.md index e2d2dadd7a..be2ed9b71c 100644 --- a/content/reusable/md/resources_common_lazy_evaluation.md +++ b/content/reusable/md/resources_common_lazy_evaluation.md @@ -1,4 +1,4 @@ -In some cases, the value for a property cannot be known until the +In some cases, the value for a property can't be known until the execution phase of a Chef Infra Client run. In this situation, using lazy evaluation of property values can be helpful. Instead of a property being assigned a value, it may instead be assigned a code block. The @@ -13,7 +13,7 @@ of the code block later on in the resource evaluation process (instead of immediately) and `{ code_block }` is arbitrary Ruby code that provides the value. -For example, a resource that is **not** doing lazy evaluation: +For example, a resource that's **not** doing lazy evaluation: ```ruby template 'template_name' do @@ -22,7 +22,7 @@ template 'template_name' do end ``` -and a resource block that is doing lazy evaluation: +and a resource block that's doing lazy evaluation: ```ruby template 'template_name' do diff --git a/content/reusable/md/resources_common_multiple_packages.md b/content/reusable/md/resources_common_multiple_packages.md index fe76d7cb30..11134be41a 100644 --- a/content/reusable/md/resources_common_multiple_packages.md +++ b/content/reusable/md/resources_common_multiple_packages.md @@ -64,7 +64,7 @@ end

    Note

    -Notifications and subscriptions do not need to be updated when packages +Notifications and subscriptions don't need to be updated when packages and versions are added or removed from the `package_name` or `version` properties. diff --git a/content/reusable/md/resources_common_notification_notifies.md b/content/reusable/md/resources_common_notification_notifies.md index e950b583c3..43942aedea 100644 --- a/content/reusable/md/resources_common_notification_notifies.md +++ b/content/reusable/md/resources_common_notification_notifies.md @@ -4,6 +4,6 @@ should take, and then the `:timer` for that action. A resource may notify more than one resource; use a `notifies` statement for each resource to be notified. -If the referenced resource does not exist, an error is raised. -In contrast, `subscribes` will not fail if the source -resource is not found. +If the referenced resource doesn't exist, an error is raised. +In contrast, `subscribes` won't fail if the source +resource isn't found. diff --git a/content/reusable/md/resources_common_notification_subscribes.md b/content/reusable/md/resources_common_notification_subscribes.md index 9d9a54ad7a..0ab804fc5e 100644 --- a/content/reusable/md/resources_common_notification_subscribes.md +++ b/content/reusable/md/resources_common_notification_subscribes.md @@ -3,7 +3,7 @@ state of the resource being listened to changes. Specify a `'resource[name]'`, the `:action` to be taken, and then the `:timer` for that action. -Note that `subscribes` does not apply the specified action to the +Note that `subscribes` doesn't apply the specified action to the resource that it listens to - for example: ```ruby @@ -19,11 +19,11 @@ end In this case the `subscribes` property reloads the `nginx` service whenever its certificate file, located under -`/etc/nginx/ssl/example.crt`, is updated. `subscribes` does not make any +`/etc/nginx/ssl/example.crt`, is updated. `subscribes` doesn't make any changes to the certificate file itself, it merely listens for a change to the file, and executes the `:reload` action for its resource (in this example `nginx`) when a change is detected. -If the other resource does not exist, the subscription will not raise an +If the other resource doesn't exist, the subscription won't raise an error. Contrast this with the stricter semantics of `notifies`, which -will raise an error if the other resource does not exist. +will raise an error if the other resource doesn't exist. diff --git a/content/reusable/md/resources_common_powershell.md b/content/reusable/md/resources_common_powershell.md index e95699f5c1..98d3aaa796 100644 --- a/content/reusable/md/resources_common_powershell.md +++ b/content/reusable/md/resources_common_powershell.md @@ -1,7 +1,7 @@ Windows PowerShell is a task-based command-line shell and scripting language developed by Microsoft. Windows PowerShell uses a document-oriented approach for managing Windows-based -machines, similar to the approach that is used for managing Unix and +machines, similar to the approach that's used for managing Unix and Linux-based machines. Windows PowerShell is [a tool-agnostic platform](https://docs.microsoft.com/en-us/powershell/scripting/powershell-scripting) that supports using Chef for configuration management. diff --git a/content/reusable/md/resources_common_properties.md b/content/reusable/md/resources_common_properties.md index 1385cb714b..2107ebd9b4 100644 --- a/content/reusable/md/resources_common_properties.md +++ b/content/reusable/md/resources_common_properties.md @@ -10,7 +10,7 @@ The following properties are common to every resource: : **Ruby Type:** true, false, :quiet \| **Default Value:** `false` - Continue running a recipe if a resource fails for any reason. `:quiet` will not display the full stack trace and the recipe will continue to run if a resource fails. + Continue running a recipe if a resource fails for any reason. `:quiet` won't display the full stack trace and the recipe will continue to run if a resource fails. `retries` @@ -28,4 +28,4 @@ The following properties are common to every resource: : **Ruby Type:** true, false \| **Default Value:** `false` - Ensure that sensitive resource data is not logged by Chef Infra Client. + Ensure that sensitive resource data isn't logged by Chef Infra Client. diff --git a/content/reusable/md/resources_common_windows_security_acl.md b/content/reusable/md/resources_common_windows_security_acl.md index 9e020f77c0..5c3356f287 100644 --- a/content/reusable/md/resources_common_windows_security_acl.md +++ b/content/reusable/md/resources_common_windows_security_acl.md @@ -34,12 +34,12 @@ where `principal` : Use to specify a group or user. The principal can be specified by - either name or SID. When using name, this is identical to what is + either name or SID. When using name, this is identical to what's entered in the login box for Windows, such as `user_name`, `domain\user_name`, or `user_name@fully_qualified_domain_name`. When using a SID, you may use either the standard string representation of a SID (S-R-I-S-S) or one of the [SDDL string constants](https://docs.microsoft.com/en-us/windows/win32/secauthz/sid-strings). Chef - Infra Client does not need to know if a principal is a user or a + Infra Client doesn't need to know if a principal is a user or a group. `option_type` @@ -86,9 +86,9 @@ Some other important things to know when using the `rights` attribute: - Only inherited rights remain. All existing explicit rights on the object are removed and replaced. -- If rights are not specified, nothing will be changed. Chef Infra - Client does not clear out the rights on a file or directory if - rights are not specified. +- If rights aren't specified, nothing will be changed. Chef Infra + Client doesn't clear out the rights on a file or directory if + rights aren't specified. - Changing inherited rights can be expensive. Windows will propagate rights to all children recursively due to inheritance. This is a normal aspect of Windows, so consider the diff --git a/content/reusable/md/resources_common_windows_security_inherits.md b/content/reusable/md/resources_common_windows_security_inherits.md index d1b33aa21e..030481faf2 100644 --- a/content/reusable/md/resources_common_windows_security_inherits.md +++ b/content/reusable/md/resources_common_windows_security_inherits.md @@ -46,6 +46,6 @@ directory 'C:\mordor\mount_doom' do end ``` -Because the `inherits` property is not specified, Chef Infra Client will +Because the `inherits` property isn't specified, Chef Infra Client will default it to `true`, which will ensure that security settings for existing files remain unchanged. diff --git a/content/reusable/md/role_attribute.md b/content/reusable/md/role_attribute.md index 8d65e30fb0..335bd75740 100644 --- a/content/reusable/md/role_attribute.md +++ b/content/reusable/md/role_attribute.md @@ -6,7 +6,7 @@ over the default attributes, Chef Infra Client applies those new settings and values during a Chef Infra Client run. A role attribute can only be set to be a default attribute or an -override attribute. A role attribute cannot be set to be a normal +override attribute. A role attribute can't be set to be a normal attribute. Use the `default_attribute` and `override_attribute` methods in the `.rb` attributes file or the `default_attributes` and `override_attributes` hashes in a JSON data file. diff --git a/content/reusable/md/ruby_class_chef_log_fatal.md b/content/reusable/md/ruby_class_chef_log_fatal.md index 9052845325..d624558cc2 100644 --- a/content/reusable/md/ruby_class_chef_log_fatal.md +++ b/content/reusable/md/ruby_class_chef_log_fatal.md @@ -3,8 +3,8 @@ The following example shows a series of fatal `Chef::Log` entries: ```ruby unless node['splunk']['upgrade_enabled'] Chef::Log.fatal('The chef-splunk::upgrade recipe was added to the node,') - Chef::Log.fatal('but the attribute `node["splunk"]["upgrade_enabled"]` was not set.') - Chef::Log.fatal('I am bailing here so this node does not upgrade.') + Chef::Log.fatal('but the attribute `node["splunk"]["upgrade_enabled"]` wasn\'t set.') + Chef::Log.fatal('I am bailing here so this node doesn\'t upgrade.') raise end @@ -31,8 +31,8 @@ if node['splunk']['accept_license'] command "#{splunk_cmd} start --accept-license --answer-yes" end else - Chef::Log.fatal('You did not accept the license (set node["splunk"]["accept_license"] to true)') - Chef::Log.fatal('Splunk is stopped and cannot be restarted until the license is accepted!') + Chef::Log.fatal('You didn\'t accept the license (set node["splunk"]["accept_license"] to true)') + Chef::Log.fatal('Splunk is stopped and can\'t be restarted until the license is accepted!') raise end ``` diff --git a/content/reusable/md/ruby_class_chef_log_multiple.md b/content/reusable/md/ruby_class_chef_log_multiple.md index 0f71904acf..9e374448bd 100644 --- a/content/reusable/md/ruby_class_chef_log_multiple.md +++ b/content/reusable/md/ruby_class_chef_log_multiple.md @@ -7,7 +7,7 @@ begin aws = Chef::DataBagItem.load(:aws, :main) Chef::Log.info("Loaded AWS information from DataBagItem aws[#{aws['id']}]") rescue - Chef::Log.fatal("Could not find the 'main' item in the 'aws' data bag") + Chef::Log.fatal("Couldn't find the 'main' item in the 'aws' data bag") raise end diff --git a/content/reusable/md/ruby_style_basics_chef_log.md b/content/reusable/md/ruby_style_basics_chef_log.md index 2629cdcc9f..be52f633e7 100644 --- a/content/reusable/md/ruby_style_basics_chef_log.md +++ b/content/reusable/md/ruby_style_basics_chef_log.md @@ -1,4 +1,4 @@ -`Chef::Log` will print log entries to the default logger that is configured for the machine on which Chef Infra Client is running. (To create a log entry that is built into the resource collection, use the [log resource](/resources/log/) instead of `Chef::Log`.) +`Chef::Log` will print log entries to the default logger that's configured for the machine on which Chef Infra Client is running. (To create a log entry that's built into the resource collection, use the [log resource](/resources/log/) instead of `Chef::Log`.) diff --git a/content/reusable/md/ruby_style_patterns_hyphens.md b/content/reusable/md/ruby_style_patterns_hyphens.md index d8a66a6bd3..2d5d29dafd 100644 --- a/content/reusable/md/ruby_style_patterns_hyphens.md +++ b/content/reusable/md/ruby_style_patterns_hyphens.md @@ -1,6 +1,6 @@ Cookbook and custom resource names should contain only alphanumeric characters. A hyphen (`-`) is a valid character and may be used in -cookbook and custom resource names, but it is discouraged. Chef Infra -Client will return an error if a hyphen is not converted to an +cookbook and custom resource names, but it's discouraged. Chef Infra +Client will return an error if a hyphen isn't converted to an underscore (`_`) when referencing from a recipe the name of a custom resource in which a hyphen is located. diff --git a/content/reusable/md/search.md b/content/reusable/md/search.md index 1b8fa28c1e..286095811b 100644 --- a/content/reusable/md/search.md +++ b/content/reusable/md/search.md @@ -1,4 +1,4 @@ -Search indexes allow queries to be made for any type of data that is +Search indexes allow queries to be made for any type of data that's indexed by the Chef Infra Server, including data bags (and data bag items), environments, nodes, and roles. A defined query syntax is used to support search patterns like exact, wildcard, range, and fuzzy. A diff --git a/content/reusable/md/search_boolean_operators.md b/content/reusable/md/search_boolean_operators.md index bf7ed5568e..6eff881025 100644 --- a/content/reusable/md/search_boolean_operators.md +++ b/content/reusable/md/search_boolean_operators.md @@ -1,5 +1,5 @@ An operator can be used to ensure that certain terms are included in the -results, are excluded from the results, or are not included even when +results, are excluded from the results, or aren't included even when other aspects of the query match. Searches can use the following operators: diff --git a/content/reusable/md/search_pattern_wildcard.md b/content/reusable/md/search_pattern_wildcard.md index 79f2ef0f79..97825af034 100644 --- a/content/reusable/md/search_pattern_wildcard.md +++ b/content/reusable/md/search_pattern_wildcard.md @@ -4,6 +4,6 @@ with anything that could match the replaced character. There are two types of wildcard searches: - A question mark (`?`) can be used to replace exactly one character - (as long as that character is not the first character in the search + (as long as that character isn't the first character in the search pattern) - An asterisk (`*`) can be used to replace any number of characters (including zero) diff --git a/content/reusable/md/search_query_syntax.md b/content/reusable/md/search_query_syntax.md index f54418156c..e0a82864a3 100644 --- a/content/reusable/md/search_query_syntax.md +++ b/content/reusable/md/search_query_syntax.md @@ -5,11 +5,11 @@ pattern. A search query has the following syntax: key:search_pattern ``` -where `key` is a field name that is found in the JSON description of an +where `key` is a field name that's found in the JSON description of an indexable object on the Chef Infra Server (a role, node, client, environment, or data bag) and `search_pattern` defines what will be searched for, using one of the following search patterns: exact, wildcard, range, or fuzzy matching. Both `key` and `search_pattern` are case-sensitive; `key` has limited support for multiple character -wildcard matching using an asterisk ("\*") (and as long as it is not the +wildcard matching using an asterisk ("\*") (and as long as it's not the first character). diff --git a/content/reusable/md/security_chef_validator_context.md b/content/reusable/md/security_chef_validator_context.md index be772e3984..88173f351f 100644 --- a/content/reusable/md/security_chef_validator_context.md +++ b/content/reusable/md/security_chef_validator_context.md @@ -1,4 +1,4 @@ -The private key does not yet exist the first time that Chef Infra Client runs from a new node. +The private key doesn't yet exist the first time that Chef Infra Client runs from a new node. During the first Chef Infra Client run: diff --git a/content/reusable/md/target_mode_custom_resource.md b/content/reusable/md/target_mode_custom_resource.md new file mode 100644 index 0000000000..5100016b10 --- /dev/null +++ b/content/reusable/md/target_mode_custom_resource.md @@ -0,0 +1,6 @@ +To enable a custom resource to run in Target Mode, add `target_mode: true` to the resource definition. For example: + +```ruby +provides :resource_name, target_mode: true +... +``` diff --git a/content/reusable/md/target_mode_custom_resource_example.md b/content/reusable/md/target_mode_custom_resource_example.md new file mode 100644 index 0000000000..12cc5ec32a --- /dev/null +++ b/content/reusable/md/target_mode_custom_resource_example.md @@ -0,0 +1,31 @@ + +The following custom resource example checks for and creates a new directory and runs in Target Mode: + +```ruby +provides :example_directory, target_mode: true +unified_mode true + +property: directory, String + +load_current_value do |new_resource| + dir = new_resource.directory + parsed = dir.match(%r{([^/]+$)}) + path = '' + if parsed + path = dir[0..(dir.length - parsed[1].length - 1)] + dir = parsed[1] + end + + tmp = __transport_connection.run_command( sprintf('ls -l %s | grep %s || echo -n', path, dir) ) + + if tmp.match(Regexp.new(dir)) + directory new_resource.directory + end +end + +action :create do + converge_if_changed do + __transport_connection.run_command( sprintf('mkdir %s', new_resource.directory) ) + end +end +``` diff --git a/content/reusable/md/target_mode_summary.md b/content/reusable/md/target_mode_summary.md new file mode 100644 index 0000000000..2561d9409f --- /dev/null +++ b/content/reusable/md/target_mode_summary.md @@ -0,0 +1 @@ +Target Mode executes Chef Infra Client runs on nodes that don't have Chef Infra Client installed on them. diff --git a/content/reusable/md/template.md b/content/reusable/md/template.md index 6cb176b113..6894fa1976 100644 --- a/content/reusable/md/template.md +++ b/content/reusable/md/template.md @@ -1 +1 @@ -A cookbook template is an Embedded Ruby (ERB) template that is used to dynamically generate static text files. Templates may contain Ruby expressions and statements, and are a great way to manage configuration files. Use the **template** resource to add cookbook templates to recipes; place the corresponding Embedded Ruby (ERB) template file in a cookbook's `/templates` directory. +A cookbook template is an Embedded Ruby (ERB) template that's used to dynamically generate static text files. Templates may contain Ruby expressions and statements, and are a great way to manage configuration files. Use the **template** resource to add cookbook templates to recipes; place the corresponding Embedded Ruby (ERB) template file in a cookbook's `/templates` directory. diff --git a/content/reusable/md/template_specificity_example.md b/content/reusable/md/template_specificity_example.md index 65fb0828d8..20fd5b8c1e 100644 --- a/content/reusable/md/template_specificity_example.md +++ b/content/reusable/md/template_specificity_example.md @@ -20,7 +20,7 @@ end ``` This resource would be matched in the same order as the `/templates` -directory structure. For a node named `host-node-desktop` that is +directory structure. For a node named `host-node-desktop` that's running Windows 8.1, the second item would be the matching item and the location: diff --git a/content/reusable/md/template_transfer_frequency.md b/content/reusable/md/template_transfer_frequency.md index 85954647a6..75d0fd52ab 100644 --- a/content/reusable/md/template_transfer_frequency.md +++ b/content/reusable/md/template_transfer_frequency.md @@ -1,4 +1,4 @@ -The Chef Infra Client caches a template when it is first requested. On +The Chef Infra Client caches a template when it's first requested. On each subsequent request for that template, the Chef Infra Client compares that request to the template located on the Chef Infra Server. If the templates are the same, no transfer occurs. diff --git a/content/reusable/md/template_variables.md b/content/reusable/md/template_variables.md index 0834cf6176..5914abacdd 100644 --- a/content/reusable/md/template_variables.md +++ b/content/reusable/md/template_variables.md @@ -12,9 +12,9 @@ A statement is delimited by a modifier, such as `if`, `elsif`, and ```ruby if false -# this will not happen +# this won't happen elsif nil - # this will not either + # this won't either end ``` diff --git a/content/reusable/md/unified_mode_actions_later_resources.md b/content/reusable/md/unified_mode_actions_later_resources.md index ba1f2ceee2..80ea220ccc 100644 --- a/content/reusable/md/unified_mode_actions_later_resources.md +++ b/content/reusable/md/unified_mode_actions_later_resources.md @@ -1,16 +1,16 @@ ## Actions on Later Resources -Since unified mode executes your resource as it is compiled, `:immediate` notifications that execute later resources are handled differently than in the past. +Since Unified Mode executes your resource as it's compiled, `:immediate` notifications that execute later resources are handled differently than in the past. ### `:immediate` Notifications to Later Resources Unified mode delays immediate notifications to later resources. In unified mode, the Chef Infra Client saves immediate notifications and executes them when the later resource is parsed. Immediate notifications to prior resources and delayed notifications behave the same as they did before unified mode. -The end result of sequentially chaining immediate notifications is the same as before unified mode. Instead of immediately notifying results, the notifications fire _in order_ as they are parsed, which has the same outcome. If the parse order and the intended execution order are different, then the results may be different and are a reflection of the parse order. +The result of sequentially chaining immediate notifications is the same as before unified mode. Instead of immediately notifying results, the notifications fire _in order_ as they're parsed, which has the same outcome. If the parse order and the intended execution order are different, then the results may be different and are a reflection of the parse order. -The changes to sending immediate notification could result in subtle changes to behaviors in some resources, but it is not a breaking change to common patterns of writing resources. +The changes to sending immediate notification could result in subtle changes to behaviors in some resources, but it's not a breaking change to common patterns of writing resources. Chaining immediate notifications to later resources: @@ -65,6 +65,6 @@ end ### Out of Order Execution -Unified mode breaks custom resources that rely on the out-of-order execution of compile-time statements. Move any affected compile-time statements to the location in the code where they are intended to execute. +Unified mode breaks custom resources that rely on the out-of-order execution of compile-time statements. Move any affected compile-time statements to the location in the code where they're intended to execute. -Out-of-order execution is rare. Internally at Chef, none of our custom resources broke during our migration to unified mode. Instead, we discovered a few cases in which custom resource code was intended to run in order, but Chef Infra Client executed it out of order. In these cases, unified mode fixed errors instead of introducing bugs. +Out-of-order execution is rare. Internally at Chef, none of our custom resources broke during our migration to unified mode. Instead, we discovered a few cases in which custom resource code was intended to run in order, but Chef Infra Client executed it out of order. In these cases, Unified Mode fixed errors instead of introducing bugs. diff --git a/content/reusable/md/unified_mode_client_releases.md b/content/reusable/md/unified_mode_client_releases.md index 6ff2c01fca..3e1e79e8df 100644 --- a/content/reusable/md/unified_mode_client_releases.md +++ b/content/reusable/md/unified_mode_client_releases.md @@ -1,7 +1,6 @@ +Unified Mode (`unified_mode true`) is the default behavior starting in Chef Infra Client 18 (April 2022). -In Chef Infra Client 17 (April 2021) and some earlier versions, unified mode is not enabled by default. Enable unified mode on a custom resource with `unified_mode true`. Chef Infra Client displays a deprecation message with `unified_mode false`. - -In Chef Infra Client 18 (April 2022), `unified_mode true` will become the default behavior. +See the following table for Chef Infra Client versions where Unified Mode can be enabled in custom resources: | Chef Infra Client | Unified Mode | |-------------------|-------------------------------| diff --git a/content/reusable/md/unified_mode_enable.md b/content/reusable/md/unified_mode_enable.md index 80748f544e..1f7d06fac0 100644 --- a/content/reusable/md/unified_mode_enable.md +++ b/content/reusable/md/unified_mode_enable.md @@ -1,7 +1,6 @@ +Unified Mode is enabled by default starting in Chef Infra Client 18. -## Enable Unified Mode - -Enable unified mode by adding the `unified_mode true` in a custom resource. You can upgrade most custom resources to use unified mode without additional work other than testing and validation. +In Chef Infra Client 17 (April 2021) and some earlier versions, you can enable Unified Mode in custom resources by adding `unified_mode true`. You can upgrade most custom resources to use Unified Mode without additional work other than testing and validation. See the following example: ```ruby # enable unified mode diff --git a/content/reusable/md/unified_mode_overview.md b/content/reusable/md/unified_mode_overview.md index 7880fbbe94..d71b5c8c62 100644 --- a/content/reusable/md/unified_mode_overview.md +++ b/content/reusable/md/unified_mode_overview.md @@ -1,2 +1,2 @@ -Unified mode is a setting that will compile and converge a custom resource's action block in one pass and in the order that the code inside that block is composed, from beginning to end. This replaces Chef Infra's two-pass parsing with single-pass parsing so that resources are executed as soon as they are declared. This results in clearer code and requires less Ruby knowledge to understand the order of operations. +Unified mode is a setting that will compile and converge a custom resource's action block in one pass and in the order that the code inside that block is composed, from beginning to end. This replaces Chef Infra's two-pass parsing with single-pass parsing so that resources are executed as soon as they're declared. This results in clearer code and requires less Ruby knowledge to understand the order of operations. diff --git a/content/reusable/md/unified_mode_troubleshooting.md b/content/reusable/md/unified_mode_troubleshooting.md index b66f66239c..f1c030a785 100644 --- a/content/reusable/md/unified_mode_troubleshooting.md +++ b/content/reusable/md/unified_mode_troubleshooting.md @@ -12,11 +12,11 @@ When designing a custom resource for unified mode: - Declare a resource first and then declare actions on it - Write resources in run-time order -### Resources with Changes to Internal Sub-resources +### Resources with changes to internal sub-resources -Some custom resources are designed to create and edit other sub-resources as part of the resource declaration. In unified mode, Chef Infra Client parses a resource code block that creates or edits a sub-resource and immediately tries to apply that change, even though the sub-resource does not yet exist. This results in the execution of an incomplete resource. +Some custom resources are designed to create and edit other sub-resources as part of the resource declaration. In unified mode, Chef Infra Client parses a resource code block that creates or edits a sub-resource and immediately tries to apply that change, even though the sub-resource doesn't yet exist. This results in the execution of an incomplete resource. -For example, with unified mode enabled, this code from the dhcp cookbook is designed to create and edit a shared `dhcp_subnet` resource, but it will not work as expected: +For example, with Unified Mode enabled, this code from the dhcp cookbook is designed to create and edit a shared `dhcp_subnet` resource, but it won't work as expected: ```ruby # 'edit_resource' results in an incomplete subresource @@ -40,9 +40,9 @@ To correct custom resources that change sub-resources during their declaration, - Apply properties in the code block (preferred) - Run the resource explicitly (not preferred) -#### Apply Properties in the Code Block +#### Apply properties in the code block -This pattern declares the sub-resource in one code block and then changes it in the next code block. This is the preferred pattern in unified mode because all resources execute in order at compile time. +This pattern declares the sub-resource in one code block and then changes it in the next code block. This is the preferred pattern in Unified Mode because all resources execute in order at compile time. ```ruby dhcp_subnet "#{new_resource.name}_sharedsubnet_#{subnet}" do @@ -60,11 +60,11 @@ dhcp_subnet "#{new_resource.name}_sharedsubnet_#{subnet}" do end ``` -#### Run the Resource Explicitly +#### Run the resource explicitly Another solution is to continue saving the resource as a variable, declare `action :nothing` within the codeblock, and then explicitly run the action in another code block. -The pattern of saving a resource as a variable and then forcing it to run at compile time with an explicit `run_action` works as it has in the past, but it is not a preferred pattern. Unified mode forces resource execution to compile time by default, which makes this pattern redundant. +The pattern of saving a resource as a variable and then forcing it to run at compile time with an explicit `run_action` works as it has in the past, but it's not a preferred pattern. Unified mode forces resource execution to compile time by default, which makes this pattern redundant. ```ruby sr = edit_resource(:dhcp_subnet, "#{new_resource.name}_sharedsubnet_#{subnet}") do diff --git a/content/reusable/md/windows_environment_variable_path.md b/content/reusable/md/windows_environment_variable_path.md index 00f7373fdd..637ab7d19d 100644 --- a/content/reusable/md/windows_environment_variable_path.md +++ b/content/reusable/md/windows_environment_variable_path.md @@ -5,7 +5,7 @@ the `PATH` environment variable: - `C:\opscode\chef\embedded\bin` This is typically done during the installation of Chef Infra Client -automatically. If these values (for any reason) are not in the `PATH` -environment variable, Chef Infra Client will not run properly. +automatically. If these values (for any reason) aren't in the `PATH` +environment variable, Chef Infra Client won't run properly. ![image](/images/includes_windows_environment_variable_path.png) diff --git a/content/reusable/md/windows_msiexec.md b/content/reusable/md/windows_msiexec.md index 8085e64000..bc99991b5c 100644 --- a/content/reusable/md/windows_msiexec.md +++ b/content/reusable/md/windows_msiexec.md @@ -1,5 +1,5 @@ Msiexec.exe is used to install Chef Infra Client on a node as part of a -bootstrap operation. The actual command that is run by the default +bootstrap operation. The actual command that's run by the default bootstrap script is: ```bash diff --git a/content/reusable/md/windows_registry_key_backslashes.md b/content/reusable/md/windows_registry_key_backslashes.md index cb08090b19..8268908602 100644 --- a/content/reusable/md/windows_registry_key_backslashes.md +++ b/content/reusable/md/windows_registry_key_backslashes.md @@ -1,7 +1,7 @@ A Windows registry key can be used as a string in Ruby code, such as when a registry key is used as the name of a recipe. In Ruby, when a registry key is enclosed in a double-quoted string (`" "`), the -same backslash character (`\`) that is used to define the registry key +same backslash character (`\`) that's used to define the registry key path separator is also used in Ruby to define an escape character. Therefore, the registry key path separators must be escaped when they are enclosed in a double-quoted string. For example, the following diff --git a/content/reusable/md/windows_spaces_and_directories.md b/content/reusable/md/windows_spaces_and_directories.md index c7eccf9371..94f17b75c9 100644 --- a/content/reusable/md/windows_spaces_and_directories.md +++ b/content/reusable/md/windows_spaces_and_directories.md @@ -1,4 +1,4 @@ -Directories that are used by Chef products on Windows cannot have -spaces. For example, `C:\Users\User Name` will not work, but +Directories that are used by Chef products on Windows can't have +spaces. For example, `C:\Users\User Name` won't work, but `C:\Users\UserName` will. Chef commands may fail if used against a directory with a space in its name. diff --git a/content/reusable/md/windows_top_level_directory_names.md b/content/reusable/md/windows_top_level_directory_names.md index e4ed34469a..a7f1353367 100644 --- a/content/reusable/md/windows_top_level_directory_names.md +++ b/content/reusable/md/windows_top_level_directory_names.md @@ -1,6 +1,6 @@ Windows will throw errors when path name lengths are too long. For this -reason, it is often helpful to use a short top-level directory, much -like what is done in UNIX and Linux. For example, Chef uses `/opt/` to +reason, it's often helpful to use a short top-level directory, much +like what's done in UNIX and Linux. For example, Chef uses `/opt/` to install Chef Workstation on macOS. A similar approach can be done on Windows, by creating a top-level directory with a short name. For example: `C:\chef`. diff --git a/content/roles.md b/content/roles.md index 83e1ed9a3c..090c2ce7cc 100644 --- a/content/roles.md +++ b/content/roles.md @@ -77,14 +77,14 @@ Domain-specific Ruby attributes:

    default_attributes

    -

    Optional. A set of attributes to be applied to all nodes, assuming the node does not already have a value for the attribute. This is useful for setting global defaults that can then be overridden for specific nodes. If more than one role attempts to set a default value for the same attribute, the last role applied is the role to set the attribute value. When nested attributes are present, they are preserved. For example, to specify that a node that has the attribute apache2 should listen on ports 80 and 443 (unless ports are already specified):

    +

    Optional. A set of attributes to be applied to all nodes, assuming the node doesn't already have a value for the attribute. This is useful for setting global defaults that can then be overridden for specific nodes. If more than one role attempts to set a default value for the same attribute, the last role applied is the role to set the attribute value. When nested attributes are present, they're preserved. For example, to specify that a node that has the attribute apache2 should listen on ports 80 and 443 (unless ports are already specified):

    default_attributes 'apache2' => {
       'listen_ports' => [ '80', '443' ]
     }

    description

    -

    A description of the functionality that is covered. For example:

    +

    A description of the functionality that's covered. For example:

    description 'The base role for systems that serve HTTP traffic'
    @@ -98,12 +98,12 @@ Domain-specific Ruby attributes:

    name

    -

    A unique name within the organization. Each name must be made up of letters (uppercase and lowercase), numbers, underscores, and hyphens: [A-Z][a-z][0-9] and [_-]. Spaces are not allowed. For example:

    +

    A unique name within the organization. Each name must be made up of letters (uppercase and lowercase), numbers, underscores, and hyphens: [A-Z][a-z][0-9] and [_-]. Spaces aren't allowed. For example:

    name 'dev01-24'

    override_attributes

    -

    Optional. A set of attributes to be applied to all nodes, even if the node already has a value for an attribute. This is useful for ensuring that certain attributes always have specific values. If more than one role attempts to set an override value for the same attribute, the last role applied wins. When nested attributes are present, they are preserved. For example:

    +

    Optional. A set of attributes to be applied to all nodes, even if the node already has a value for an attribute. This is useful for ensuring that certain attributes always have specific values. If more than one role attempts to set an override value for the same attribute, the last role applied wins. When nested attributes are present, they're preserved. For example:

    override_attributes 'apache2' => {
       'max_children' => '50'
     }
    @@ -125,7 +125,7 @@ Domain-specific Ruby attributes:

    run_list

    -

    A list of recipes and/or roles to be applied and the order in which they are to be applied. For example, the following run-list:

    +

    A list of recipes and/or roles to be applied and the order in which they're to be applied. For example, the following run-list:

    run_list 'recipe[apache2]',
              'recipe[apache2::mod_ssl]',
              'role[monitor]'
    @@ -135,7 +135,7 @@ Domain-specific Ruby attributes: Each role must be saved as a ruby file in the `roles/` subdirectory of -the chef-repo. (If the repository does not have this subdirectory, then +the chef-repo. (If the repository doesn't have this subdirectory, then create it using knife.) Each Ruby file should have the `.rb` suffix. A complete role has the following syntax: @@ -229,7 +229,7 @@ The JSON format has two additional settings: json_class -Always set this to Chef::Role. The Chef Infra Client uses this setting to auto-inflate a role object. If objects are being rebuilt outside of Ruby, ignore it. +Always set this to Chef::Role. The Chef Infra Client uses this setting to auto inflate a role object. If objects are being rebuilt outside of Ruby, ignore it. @@ -260,22 +260,22 @@ By creating and editing files using the Chef Language (Ruby) or JSON, you can dy using files are compatible with all versions of Chef, including chef-solo. Roles created and edited using files can be kept in version source control, which also keeps a history of what changed when. When -roles are created and edited using files, they should not be managed +roles are created and edited using files, they shouldn't be managed using knife, as changes will be overwritten. -A run-list that is associated with a role can be edited using the Chef +A run-list that's associated with a role can be edited using the Chef management console add-on. The canonical source of a role's data is stored on the Chef Infra Server, which means that keeping role data in version source control can be challenging. If roles are created and managed using knife and then arbitrarily updated uploaded through JSON data, that action will overwrite the previous work with knife. -It is strongly recommended to keep to one process and not switch back and forth. +It's strongly recommended to keep to one process and not switch back and forth. ### Set Run-lists for Environments -Associating a run-list with a role and a specific environment lets you use the run-list on different nodes that share the same environment. More than one environment can be specified in a role, but each specific environment may be associated with only one run-list. If a run-list is not specified, the default run-list will be used. For example: +Associating a run-list with a role and a specific environment lets you use the run-list on different nodes that share the same environment. More than one environment can be specified in a role, but each specific environment may be associated with only one run-list. If a run-list isn't specified, the default run-list will be used. For example: ```json { @@ -309,6 +309,6 @@ where: ### Delete from Run-list When an environment is deleted, it will remain within a run-list for a -role until it is removed from that run-list. If a new environment is +role until it's removed from that run-list. If a new environment is created that has an identical name to an environment that was deleted, a run-list that contains an old environment name will use the new one. diff --git a/content/ruby.md b/content/ruby.md index adf991daec..10ab525b04 100644 --- a/content/ruby.md +++ b/content/ruby.md @@ -23,8 +23,8 @@ This section covers the basics of Ruby. ### Verify Syntax -Many people who are new to Ruby often find that it does not take -long to get up to speed with the basics. For example, it is useful to +Many people who are new to Ruby often find that it doesn't take +long to get up to speed with the basics. For example, it's useful to know how to check the syntax of a Ruby file, such as the contents of a cookbook named `my_cookbook.rb`: @@ -93,18 +93,18 @@ Embed Ruby in a string: ```ruby x = 'Bob' "Hi, #{x}" # => "Hi, Bob" -'Hello, #{x}' # => "Hello, \#{x}" Notice that single quotes do not work with #{} +'Hello, #{x}' # => "Hello, \#{x}" Notice that single quotes don't work with #{} ``` #### Escape Character Use the backslash character (`\`) as an escape character when quotes -must appear within strings. However, you do not need to escape single +must appear within strings. However, you don't need to escape single quotes inside double quotes. For example: ```ruby 'It\'s alive!' # => "It's alive!" -"Won\'t you read Grant\'s book?" # => "will not you read Grant's book?" +"Won\'t you read Grant\'s book?" # => "won't you read Grant's book?" ``` #### Interpolation @@ -144,7 +144,7 @@ false # => false nil # => nil 0 # => true ( the only false values in Ruby are false # and nil; in other words: if it exists in Ruby, - # even if it exists as zero, then it is true.) + # even if it exists as zero, then it's true.) 1 == 1 # => true ( == tests for equality ) 1 == true # => false ( == tests for equality ) ``` @@ -157,8 +157,8 @@ Work with basic untruths (`!` means not!): !true # => false !false # => true !nil # => true -1 != 2 # => true (1 is not equal to 2) -1 != 1 # => false (1 is not equal to itself) +1 != 2 # => true (1 isn't equal to 2) +1 != 1 # => false (1 isn't equal to itself) ``` #### Convert Truths @@ -169,7 +169,7 @@ Convert something to either true or false (`!!` means not not!!): !!true # => true !!false # => false !!nil # => false (when pressed, nil is false) -!!0 # => true (zero is NOT false). +!!0 # => true (zero isn't false). ``` ### Arrays @@ -225,7 +225,7 @@ end ### Hash -A Hash is a list with keys and values. Sometimes hashes do not have a set +A Hash is a list with keys and values. Sometimes hashes don't have a set order: ```ruby @@ -264,9 +264,9 @@ Use conditions! For example, an `if` statement ```ruby if false - # this will not happen + # this won't happen elsif nil - # this will not either + # this won't either else # code here will run though end @@ -278,7 +278,7 @@ or a `case` statement: x = 'dog' case x when 'fish' - # this will not happen + # this won't happen when 'dog', 'cat', 'monkey' # this will run else @@ -290,7 +290,7 @@ end An `if` statement can be used to specify part of a recipe to be used when certain conditions are met. `else` and `elsif` statements can be -used to handle situations where either the initial condition is not met +used to handle situations where either the initial condition isn't met or when there are other possible conditions that can be met. Since this behavior is 100% Ruby, do this in a recipe the same way here as anywhere else. @@ -307,7 +307,7 @@ end `if` can be used as a modifier that executes the left side of an expression if the right side of the expression is true. The `if` modifier expression must -be a single line, and `else` and `elsif` statements are not supported. +be a single line, and `else` and `elsif` statements aren't supported. In the following example, the `do_ubuntu_thing` function will execute if the platform on a node is Ubuntu. @@ -461,7 +461,7 @@ Name things uniformly for their system and component. For example: - directories: `foo/bar` (if specific to component), `foo` (if not). For example: `/var/log/foo/bar`. -Name attributes after the recipe in which they are primarily used. for example +Name attributes after the recipe in which they're primarily used. for example `node['postgresql']['server']`. ### Parameter Order @@ -512,9 +512,9 @@ mode 755 ### Specify Resource Action? -A resource declaration does not require the action to be specified +A resource declaration doesn't require the action to be specified because Chef Infra Client will apply the default action for a resource -automatically if it is not specified within the resource block. For +automatically if it's not specified within the resource block. For example: ```ruby @@ -537,7 +537,7 @@ end ### String Quoting -Use single-quoted strings in all situations where the string does not +Use single-quoted strings in all situations where the string doesn't need interpolation. #### Whitespace Arrays @@ -676,7 +676,7 @@ template '/srv/wordpress_demo/wp-config.php' do auth_salt: 'arbitrary data source, such as a password', secure_auth_salt: 'vault. Node attributes could work', logged_in_salt: 'as well, but you take special care', - nonce_salt: 'so they are not saved to your chef-server.', + nonce_salt: 'so they're not saved to your chef-server.', allow_multisite: 'false' ) action :create diff --git a/content/run_lists.md b/content/run_lists.md index 2dec317162..99b3b5e45d 100644 --- a/content/run_lists.md +++ b/content/run_lists.md @@ -90,7 +90,7 @@ The following examples show how to use this knife subcommand: #### Options -This command does not have any specific options. +This command doesn't have any specific options. {{< note >}} @@ -120,7 +120,7 @@ The following examples show how to use this knife subcommand: #### Options -This command does not have any specific options. +This command doesn't have any specific options. #### Examples diff --git a/content/saas/register_nodes.md b/content/saas/register_nodes.md index e124e010f8..02e0dfbf03 100644 --- a/content/saas/register_nodes.md +++ b/content/saas/register_nodes.md @@ -19,7 +19,7 @@ The following are prerequisites for migrating nodes from AWS OpsWorks to Chef Sa - A Chef SaaS environment must be configured. Refer to the [Getting Started with Chef SaaS](/saas/get_started/) page. - Restoration is performed on AWS OpsWorks for Chef SaaS. - Splay mode and baseline are up to two client runs an hour. Refer to the [Chef Infra Client](/ctl_chef_client/) page for more details on configuring splay mode in the `client.rb` file. -- There must be one compliance scan per hour. +- There must be one compliance scan each hour. ## Redirect nodes to Chef SaaS diff --git a/content/saas/sso.md b/content/saas/sso.md index de9f3bc396..d960477218 100644 --- a/content/saas/sso.md +++ b/content/saas/sso.md @@ -23,7 +23,7 @@ Chef SaaS supports the following IdPs: ### Add SAML configuration -{{< note >}}It is crucial to note that your account must hold the Administrator policy to access the SSO user interface. This policy is automatically granted to members of the admin team.{{< /note >}} +{{< note >}}It's crucial to note that your account must hold the Administrator policy to access the SSO user interface. This policy is automatically granted to members of the admin team.{{< /note >}} Use the following instructions to add a SAML configuration in Chef SaaS. @@ -53,7 +53,7 @@ Use the following instructions to add a SAML configuration in Chef SaaS. Group Attribute : The group attribute in the SAML assertion. - If not provided, users authenticating with SSO will not be a member of any [team]({{< relref "/automate/teams" >}}). + If not provided, users authenticating with SSO won't be a member of any [team]({{< relref "/automate/teams" >}}). : _Optional_ Allowed Groups diff --git a/content/search.md b/content/search.md new file mode 100644 index 0000000000..f7645e72c4 --- /dev/null +++ b/content/search.md @@ -0,0 +1,6 @@ ++++ +title = "Chef Documentation Search" +layout = "search" +left_nav = false +feedback = false ++++ diff --git a/content/server_configure_saml.md b/content/server_configure_saml.md index aeb72c7ad9..83338cb62f 100644 --- a/content/server_configure_saml.md +++ b/content/server_configure_saml.md @@ -22,7 +22,7 @@ product = [] {{< /warning >}} Chef Manage can support logging in users using SAML authentication. In -order to do so, there must be a Chef Automate Server that is configured +order to do so, there must be a Chef Automate Server that's configured to act as a SAML Identity Provider (IdP). When the Chef Automate Server is configured to do so, it will provide an OpenID Connect (OIDC) protocol end-point that Chef Manage can use to initiate authentication. @@ -62,7 +62,7 @@ Finally, run `chef-manage-ctl reconfigure` to apply these settings. {{< warning >}} -You cannot have both LDAP and SAML authentication enabled at the same +You can't have both LDAP and SAML authentication enabled at the same time. If you do, the reconfigure will fail with an appropriate error message. diff --git a/content/server_ldap.md b/content/server_ldap.md index bc69e297bd..60eee70e27 100644 --- a/content/server_ldap.md +++ b/content/server_ldap.md @@ -15,7 +15,7 @@ product = ["server"] The Chef Infra Server supports Active Directory and LDAP authentication, which enables users to log in to the Chef Infra Server using their corporate credential and the Manage interface. Without the Manage interface add-on installed, -there is no need to enable the Chef Infra Server LDAP functionality. LDAP is not used with +there is no need to enable the Chef Infra Server LDAP functionality. LDAP isn't used with Supermarket logins, nor with any Chef Infra Client related authentication. ## Configure LDAP @@ -315,7 +315,7 @@ distinguishedName: CN=Robert Forster,OU=Employees,OU=Domain users,DC=opscodecorp {{< note >}} -The `ldapsearch` command may need to be installed on the platform. It is +The `ldapsearch` command may need to be installed on the platform. It's not included as part of the Chef Infra Server package. {{< /note >}} diff --git a/content/server_manage_clients.md b/content/server_manage_clients.md index 7ebb6fae48..4aff7268de 100644 --- a/content/server_manage_clients.md +++ b/content/server_manage_clients.md @@ -30,8 +30,8 @@ This topic is about using the Chef management console to manage keys. A client is an actor that has permission to access the Chef Infra Server. A client is most often a node (on which the Chef Infra Client runs), but is also a workstation (on which knife runs), or some other -machine that is configured to use the Chef Infra Server API. Each -request to the Chef Infra Server that is made by a client uses a private +machine that's configured to use the Chef Infra Server API. Each +request to the Chef Infra Server that's made by a client uses a private key for authentication that must be authorized by the public key on the Chef Infra Server. diff --git a/content/server_manage_cookbooks.md b/content/server_manage_cookbooks.md index 9c249cd4f7..ffdef3a163 100644 --- a/content/server_manage_cookbooks.md +++ b/content/server_manage_cookbooks.md @@ -99,7 +99,7 @@ Infra Server are visible from the Chef management console. ### Download File -To download a file that is located in a cookbook: +To download a file that's located in a cookbook: 1. Open the Chef management console. diff --git a/content/server_manage_nodes.md b/content/server_manage_nodes.md index 08d4a8b55d..52d286603d 100644 --- a/content/server_manage_nodes.md +++ b/content/server_manage_nodes.md @@ -108,7 +108,7 @@ During every Chef Infra Client run, Chef Infra Client builds the attribute list - Attributes passed using JSON on the command line - Data about the node collected by [Ohai](/ohai.html). - The node object that was saved to the Chef Infra Server at the end of the previous Chef Infra Client run. -- The rebuilt node object from the current Chef Infra Client run, after it is updated for changes to cookbooks (attribute files and/or recipes) and/or Policyfiles, and updated for any changes to the state of the node itself. +- The rebuilt node object from the current Chef Infra Client run, after it's updated for changes to cookbooks (attribute files and/or recipes) and/or Policyfiles, and updated for any changes to the state of the node itself. After the node object is rebuilt, all of the attributes are compared, and then the node is updated based on attribute precedence. At the end of every Chef Infra Client run, the node object that defines the current state of the node is uploaded to the Chef Infra Server so that it can be indexed for search. diff --git a/content/style/_index.md b/content/style/_index.md index a4c3efbc91..e5e6298fa5 100644 --- a/content/style/_index.md +++ b/content/style/_index.md @@ -30,7 +30,7 @@ Our main repository for [docs.chef.io](https://docs.chef.io) is called [chef-web - The `chef-web-docs` repo contains a `content` directory which holds most the Markdown files in the doc set. - The `static/images` directory stores the image files used in the docs. -- The `config.toml` tells Hugo how to build the navigation menus and contains other Hugo settings. do not modify this file. +- The `config.toml` tells Hugo how to build the navigation menus and contains other Hugo settings. Don't modify this file. ### Repository locations diff --git a/content/style/chef_house.md b/content/style/chef_house.md index efe089f979..4ee550a1d8 100644 --- a/content/style/chef_house.md +++ b/content/style/chef_house.md @@ -17,7 +17,7 @@ We recommend that you use the conventions described in this guide when contribut ## Grammar -Chef does not follow a specific grammar convention. Be clear and +Chef doesn't follow a specific grammar convention. Be clear and consistent as often as possible. Follow the established patterns in the docs. @@ -60,11 +60,11 @@ Use the `4thcafe.com` domain for generic domains and email addresses in the docu ### Example Names -do not reveal personal information in examples, such as the names of real people, real email addresses, or phone numbers. +don't reveal personal information in examples, such as the names of real people, real email addresses, or phone numbers. -do not use the names of bands, musicians, or characters from works that are under copyright. +don't use the names of bands, musicians, or characters from works that are under copyright. -When writing about security, follow the accepted convention and use "Alice" and "Bob". Following this convention helps readers see that they are reading a topic about security and integrate the Chef information with their existing knowledge. +When writing about security, follow the accepted convention and use "Alice" and "Bob". Following this convention helps readers see that they're reading a topic about security and integrate the Chef information with their existing knowledge. Here is a list of some example names for you to use (the last names are translations of "Chef"): diff --git a/content/style/contribute.md b/content/style/contribute.md index dc010bde75..822d62f962 100644 --- a/content/style/contribute.md +++ b/content/style/contribute.md @@ -59,7 +59,7 @@ which is circled in red in this image. ### DCO sign-off -Chef Software requires all contributors to include a [Developer Certificate of Origin](https://developercertificate.org/) (DCO) sign-off with their pull request as long as the pull request does not fall under the [Obvious Fix](#obvious-fix) rule. This attests that you have the right to submit the work that you are contributing in your pull request. +Chef Software requires all contributors to include a [Developer Certificate of Origin](https://developercertificate.org/) (DCO) sign-off with their pull request as long as the pull request doesn't fall under the [Obvious Fix](#obvious-fix) rule. This attests that you have the right to submit the work that you are contributing in your pull request. See this [blog post](https://blog.chef.io/2016/09/19/introducing-developer-certificate-of-origin/) to understand why Chef started using the DCO signoff. diff --git a/content/style/front_matter.md b/content/style/front_matter.md index d90d12075a..a39e61b299 100644 --- a/content/style/front_matter.md +++ b/content/style/front_matter.md @@ -49,7 +49,7 @@ title : The title of the page. This will appear at the top of the page. draft (optional) -: Set draft to `true` if you do not want Hugo to build the page. +: Set draft to `true` if you don't want Hugo to build the page. aliases (optional) : Add an alias if you want Hugo to automatically redirect the user from another page to the page you are writing. Use this if you are renaming or deleting a page. @@ -106,12 +106,12 @@ title identifier : The menu identifier of the page that you are writing. Each identifier must be unique. -The convention we have adopted is to use the identifier of the page's parent, a forward slash, then the page file, a space, and then the page title. +The convention we've adopted is to use the identifier of the page's parent, a forward slash, then the page file, a space, and then the page title. For example, this page's parent identifier is `overview/style`, the menu title is `Page Front Matter`, so the full page identifier is `overview/style/Page Front Matter`. parent : The page's parent menu identifier. - The convention we have adopted is to append the different menu levels together, separated by a forward slash, and starting with the highest level. For example, this page is nested under Overview and then style, so the page's parent identifier is `overview/style`. + The convention we've adopted is to append the different menu levels together, separated by a forward slash, and starting with the highest level. For example, this page is nested under Overview and then style, so the page's parent identifier is `overview/style`. weight (optional) : The rank that the page will appear in the menu, incremented by 10. Higher numbers are lower in the menu. If `weight` excluded, the page is sorted in the menu alphabetically by page title. diff --git a/content/style/headings.md b/content/style/headings.md index a34eef2229..efef3c7683 100644 --- a/content/style/headings.md +++ b/content/style/headings.md @@ -12,7 +12,7 @@ gh_repo = "chef-web-docs" The following sections describe the section heading pattern that Chef is using for topic titles, H1s, H2s, H3s and H4s. -As a general rule, limit the number of heading levels to no more than two within a topic. There can be exceptions, especially if the document is large, but remember that HTML TOC structures usually have width limitations (on the display side) and the more structure within a TOC, the harder it can be for users to figure out what is in it. +As a general rule, limit the number of heading levels to no more than two within a topic. There can be exceptions, especially if the document is large, but remember that HTML TOC structures usually have width limitations (on the display side) and the more structure within a TOC, the harder it can be for users to figure out what's in it. Unless the topics are about installing things or about API endpoints, the headings should never wrap. Keep them to a single line. @@ -26,7 +26,7 @@ Don't use headings to define CLI commands, properties, parameters, or other term ## H1 -The H1 heading is reserved for the page title which is created by the Hugo page template. The Markdown file text should not have any H1 headings. +The H1 heading is reserved for the page title which is created by the Hugo page template. The Markdown file text shouldn't have any H1 headings. ## H2 diff --git a/content/style/linking.md b/content/style/linking.md index 1bc2d29674..e59a8249f1 100644 --- a/content/style/linking.md +++ b/content/style/linking.md @@ -67,7 +67,7 @@ To make a link in Markdown, put the link text in square brackets followed by the ### relref shortcode We recommend using Hugo's built-in [relref shortcode](https://gohugo.io/content-management/shortcodes/#ref-and-relref) for making relative links to other pages in Chef's documentation. -If a link is made to a page that does not exist, the site build will fail when Hugo generates a preview of the site. +If a link is made to a page that doesn't exist, the site build will fail when Hugo generates a preview of the site. This will help us prevent dead links in our own documentation if a page is moved or deleted. To format link to pages: diff --git a/content/style/markdown.md b/content/style/markdown.md index fbd4302249..d81b8325cf 100644 --- a/content/style/markdown.md +++ b/content/style/markdown.md @@ -71,7 +71,7 @@ Use this approach to show code blocks that use any type of JavaScript, including ### Literal -Literals should be used sparingly, but sometimes there is a need for a block of text that does not work in a fenced code block, such as showing a directory structure, basic syntax, or pseudocode. To make a literal code block, indent the text by **four** spaces: +Literals should be used sparingly, but sometimes there is a need for a block of text that doesn't work in a fenced code block, such as showing a directory structure, basic syntax, or pseudocode. To make a literal code block, indent the text by **four** spaces: ``` diff --git a/content/style/notices.md b/content/style/notices.md index 22182c09e5..a5dcbd14da 100644 --- a/content/style/notices.md +++ b/content/style/notices.md @@ -53,7 +53,7 @@ This is text in a warning. Danger notices should be used when there are serious consequences for the user or their system. If a user ignores a danger notice, they may lose data, money, work, or expose themselves to a security vulnerability. -**Use a danger notice only if it's absolutely necessary.** +**Use a danger notice only if it's necessary.** When writing text in a danger notice, use short direct language and be specific about what will happen if someone ignores a danger notice. diff --git a/content/style/procedures.md b/content/style/procedures.md index 7436ce159c..32cb6207c3 100644 --- a/content/style/procedures.md +++ b/content/style/procedures.md @@ -91,7 +91,7 @@ A higher level would tell users to log into an account. Both of these levels achieve the same goal, logging a user into an account, but the lower level splits the procedure into several smaller steps. This lower level is too low for must users and certainly too low for Chef's users. -Higher level tasks give the user a better overview of the procedures and where they are while following a set of procedures. +Higher level tasks give the user a better overview of the procedures and their location while following a set of procedures. Higher level tasks are also less likely to become obsolete when a product is updated. It's important to understand the users' skill level so steps can be written at the correct level. @@ -99,7 +99,7 @@ It's important to understand the users' skill level so steps can be written at t ### Each step is an action Each step is an action that a user will perform or a decision that a user must make. -If an action triggers a response from an application or a system, that response is not a step. +If an action triggers a response from an application or a system, that response isn't a step. Use an [imperative verb](https://en.wikipedia.org/wiki/Imperative_mood#English) in the first sentence of every step to clarify the action that the user will take. Format each step as a separate ordered list item. @@ -293,7 +293,7 @@ The config file specifies settings for the server. ### Avoid passive voice -[Passive voice](https://en.wikipedia.org/wiki/Passive_voice#In_English) is often vague and it can be unclear who or what is performing an action. +[Passive voice](https://en.wikipedia.org/wiki/Passive_voice#In_English) is often vague and it can be unclear who or what's performing an action. {{< recommend not >}} @@ -361,7 +361,7 @@ Before upgrading, back up the node. ### Don't use _we_ when referring to the user -_We_ are not doing anything. The user is doing something so use _you_ if you must, but it's better to use the implied _you_ in the [imperative mood](https://en.wikipedia.org/wiki/Imperative_mood#Usage) . +_We_ aren't doing anything. The user is doing something so use _you_ if you must, but it's better to use the implied _you_ in the [imperative mood](https://en.wikipedia.org/wiki/Imperative_mood#Usage) . {{< recommend not >}} diff --git a/content/style/product_names.md b/content/style/product_names.md index 905f148e23..05e72ac109 100644 --- a/content/style/product_names.md +++ b/content/style/product_names.md @@ -18,6 +18,7 @@ This page provides guidance on using Chef product names. See the [Terms page]({{ For Chef applications and components, use: +- Chef 360 Platform - Chef Automate - Chef Backend - Chef Habitat @@ -33,7 +34,7 @@ Always capitalize product names and never hyphenate a product name or refer to a ## Shorten product names -It is awkward to refer to the full product name all the time. +It's awkward to refer to the full product name all the time. Use the full product name the first time it's used in a page or paragraph and then use the shortened product name afterward. ## Using _the_ before product names diff --git a/content/style/test.md b/content/style/test.md index 6e4162753a..d492837169 100644 --- a/content/style/test.md +++ b/content/style/test.md @@ -581,7 +581,7 @@ link target in parentheses. [Link to chef.io](https://chef.io/) or -You can also use HTML, but it is not preferred. +You can also use HTML, but it's not preferred. Link to chef.io ## Images @@ -623,7 +623,7 @@ You can also use HTML for images, but we don't recommend it. ## Tables -Simple tables have one row per line, and columns are separated by `|` +Simple tables have one row for each line, and columns are separated by `|` characters. The header is separated from the body by cells containing nothing but at least three `-` characters. For ease of maintenance, try to keep all the cell separators even, even if you heed to use extra space. diff --git a/content/target_mode.md b/content/target_mode.md index 87c374767a..be9cab1b15 100644 --- a/content/target_mode.md +++ b/content/target_mode.md @@ -3,15 +3,16 @@ title = "Target Mode" draft = false gh_repo = "chef-web-docs" +product = ["client"] + [menu] [menu.infra] - title = "Target Mode" - identifier = "chef_infra/features/Target Mode" - parent = "chef_infra/features" - weight = 80 + identifier = "chef_infra/resources/Target Mode" + parent = "chef_infra/resources" + weight = 30 +++ -Target Mode executes Chef Infra Client runs on nodes that don't have Chef Infra Client installed on them. +{{< readfile file="content/reusable/md/target_mode_summary.md" >}} The target node can be any remote system, edge device, or cloud resource that the host can reach. This includes edge devices, Wi-Fi routers, switches, relays, cloud resources, IP phones, router hubs, and network management peripherals. @@ -32,16 +33,17 @@ Target Mode has the following requirements: ## Credentials file -The credentials file defines the connection settings for each node in TOML format. +The credentials file defines the SSH connection settings for each node in TOML format. -The credentials file is located in `~/.chef/credentials` on Linux and Mac systems, or `c:\Users\\.chef\credentials` on Windows. +Create a credentials file on the computer running Chef Workstation in the following location: -### Examples +- on Linux and macOS: `~/.chef/credentials` +- on Windows: `c:\Users\\.chef\credentials` -Define the list of nodes in the credentials file using the TOML format. -The connection settings for each node are defined using a [TOML Inline Table](https://toml.io/en/v1.0.0#inline-table). +### Define node connections -For example, this adds credentials for three nodes using SSH: +Define connection settings for each node with an [inline table](https://toml.io/en/v1.0.0#inline-table). +For example, this adds credentials for three nodes: ```toml ['HOST-1'] @@ -86,38 +88,6 @@ host = '' # key_files = '' # password = '' -# ssh_config_file: Whether to use settings from a local SSH config file. Default is 'true'. -# ssh_config_file = true - -# ==== Keepalive settings ==== -# keepalive: Whether to keep the session alive. Default is true. -# keepalive_interval: The keepalive interval. Default is 60 seconds. -# ==== - -# keepalive = true -# keepalive_interval = '60' - -# ==== Connection attempt/delay settings ==== -# connection_timeout: The timeout (in seconds) used when connecting to the SSH target. Default is 15 seconds. -# connection_retries: The number of connection retries. Default is 5. -# connection_retry_sleep: The connection retry delay in seconds. Default is 1. -# max_wait_until_ready: The maximum wait time for the SSH service to connect. Default is 600. -# ==== - -# connection_timeout = '15' -# connection_retries = '5' -# connection_retry_sleep = '1' -# max_wait_until_ready = '600' - -# compression: Whether to use compression. Default is false. -# compression = false - -# pty: Wether to use PTY to connect. Default is false. -# pty = false - -# proxy_command: A proxy command to use to connect to the server. Default is 'nil'. -# proxy_command = 'nil' - # ==== Bastion host settings ==== # bastion_host: A bastion host to connect to the target through. Default is 'nil'. # bastion_user: The bastion host user. Default is 'root'. @@ -128,9 +98,6 @@ host = '' # bastion_user = 'root' # bastion_port = '22' -# non_interactive: Whether to use a non-interactive session. Default is false. -# non_interactive = false - # verify_host_key: Whether to verify the host key. Default is false # verify_host_key = false @@ -141,11 +108,13 @@ host = '' transport_protocol = 'ssh' ``` -### SSH properties +### Node connection parameters -Target Mode supports the following SSH connection properties in a credentials file: +Target Mode supports the following SSH connection parameters in a credentials file. + +Common parameters: `host` : (Required) The IP address or FQDN of a node. @@ -169,91 +138,32 @@ Target Mode supports the following SSH connection properties in a credentials fi `transport_protocol` : (Required) The protocol to use to connect to a node. Define this once for all nodes in the credentials file. Set to `ssh`. -`ssh_config_file` -: Whether to use an SSH config file. For example: - - - `~/.ssh/config` - - `/etc/ssh_config` - - `/etc/ssh/ssh_config` - - Settings defined in the credentials file override settings in the SSH config file. - - Default value: `true` - -`keepalive` -: Whether to keep the session alive. - - Default value: `true` - -`keepalive_interval` -: The keepalive interval. - - Default value: `60` - -`connection_timeout` -: The timeout (in seconds) used when connecting to the SSH target. - - Default value: `15` - -`connection_retries` -: The number of connection retries. - - Default value: `5` - -`connection_retry_sleep` -: The connection retry delay in seconds. - - Default value: `1` - -`max_wait_until_ready` -: The maximum wait time for the SSH service to connect. - - Default value: `600` - -`compression` -: Whether to use compression. - - Default value: `false` - -`pty` -: Wether to use PTY to connect. - - Default value: `false` - -`proxy_command` -: A proxy command to use to connect to the server. - - Default value: `nil` +Additional parameters: `bastion_host` : A bastion host to connect to the target through. Default value: `nil` -`bastion_user` -: A bastion host user. - - Default value: `"root"` - `bastion_port` : A bastion host port. Default value: `22` -`non_interactive` -: Whether to use a non-interactive session. +`bastion_user` +: A bastion host user. - Default value: `false` + Default value: `"root"` -`verify_host_key` -: Whether to verify the host key. +`forward_agent` +: Whether the connection to the authentication agent (if any) is forwarded to the remote machine. Default value: `false` -`forward_agent` -: Whether the connection to the authentication agent (if any) will be forwarded to the remote machine. +`verify_host_key` +: Whether to verify the host key. - Default value: `false` + Allowed values: `true`, `false`. Default value: `false` @@ -273,47 +183,13 @@ The following Chef Infra Client resources are supported in Target Mode starting ### Custom resources -To enable a custom resource to run in Target Mode, add `target_mode: true` to the resource definition. For example: - -```ruby -provides :, target_mode: true -... -``` +{{< readfile file="/reusable/md/target_mode_custom_resource.md" >}} See the [Custom Resources documentation]({{< relref "custom_resources" >}}) for more detailed documentation about creating custom resources. #### Example -The following custom resource example checks for and creates a new directory and runs in Target Mode: - -```ruby -provides :example_directory, target_mode: true -unified_mode true - -property: directory, String - -load_current_value do |new_resource| - dir = new_resource.directory - parsed = dir.match(%r{([^/]+$)}) - path = '' - if parsed - path = dir[0..(dir.length - parsed[1].length - 1)] - dir = parsed[1] - end - - tmp = __transport_connection.run_command( sprintf('ls -l %s | grep %s || echo -n', path, dir) ) - - if tmp.match(Regexp.new(dir)) - directory new_resource.directory - end -end - -action :create do - converge_if_changed do - __transport_connection.run_command( sprintf('mkdir %s', new_resource.directory) ) - end -end -``` +{{< readfile file="/reusable/md/target_mode_custom_resource_example.md" >}} ## Run Target Mode @@ -323,7 +199,8 @@ Run the `chef-client` executable using `-t` or `--target` to target a specific n chef-client -t ``` -Replace `` with the name of the host as defined in the credentials file. For example, `HOST-1` in the [credential file example](#examples). +Replace `` with the name of the host as defined in the credentials file. +For example, `HOST-1` in the [credential file example](#define-node-connections). To execute a specific Cookbook in Target Mode, run: @@ -347,7 +224,8 @@ Use `-z` and `-t` to run Target Mode in Local Mode: chef-client -z -t ``` -Replace `` with the name of the host as defined in the credentials file. For example, `HOST-1` in the [credential file example](#examples). +Replace `` with the name of the host as defined in the credentials file. +For example, `HOST-1` in the [credential file example](#define-node-connections). ## Run Target Mode with Chef Automate or Chef Infra Server diff --git a/content/templates.md b/content/templates.md index c111c44197..41efb2e6f2 100644 --- a/content/templates.md +++ b/content/templates.md @@ -16,7 +16,7 @@ aliases = ["/templates.html", "essentials_cookbook_templates.html"] {{< readfile file="content/reusable/md/template.md" >}} -The `templates` directory does not exist by default in a cookbook. +The `templates` directory doesn't exist by default in a cookbook. Generate the `templates` directory and a template file from the `chef-repo/cookbooks` directory with the command: ```bash diff --git a/content/terraform.md b/content/terraform.md index d57b1e76c4..86f03df9e1 100644 --- a/content/terraform.md +++ b/content/terraform.md @@ -17,11 +17,11 @@ product = ["client", "server"] Terraform deprecated the Chef Provisioner in the [0.13.4](https://www.terraform.io/docs/language/resources/provisioners/chef.html) release and they will remove it in a future version. Terraform continues to support the Chef Provider. {{< /warning >}} -[Terraform](https://www.terraform.io/) is an open-source infrastructure-as-code provisioning tool from [HashiCorp](https://www.hashicorp.com/). Terraform allows you to write code to define and provision infrastructure for the cloud, virtual machines, and on-premises machines. Terraform is not a configuration management tool, it is responsible for deploying, maintaining, and destroying the infrastructure that servers and applications run on. When Terraform creates cloud or virtual servers, it uses [Provisioners](https://www.terraform.io/docs/provisioners/index.html) to enable configuration management to manage them. When Terraform talks to APIs to define or configure resources, it uses [Providers](https://www.terraform.io/docs/providers/index.html) to request those resources. +[Terraform](https://www.terraform.io/) is an open-source infrastructure-as-code provisioning tool from [HashiCorp](https://www.hashicorp.com/). Terraform allows you to write code to define and provision infrastructure for the cloud, virtual machines, and on-premises machines. Terraform isn't a configuration management tool, it's responsible for deploying, maintaining, and destroying the infrastructure that servers and applications run on. When Terraform creates cloud or virtual servers, it uses [Provisioners](https://www.terraform.io/docs/provisioners/index.html) to enable configuration management to manage them. When Terraform talks to APIs to define or configure resources, it uses [Providers](https://www.terraform.io/docs/providers/index.html) to request those resources. ## Chef Infra Provisioner -The [Terraform Chef Provisioner](https://www.terraform.io/docs/provisioners/chef.html) bootstraps Terraform, provisioned with Chef Infra using SSH or WinRM, and configures them to work with a [Chef Infra Server](/server/). Standard bootstrap options such as Chef Infra versions, secrets, proxies, and assigning run lists using Policyfiles or Roles and Environments are all supported. The referenced documentation provides a complete list of supported options and an example of usage. HashiCorp provides support for the [Terraform Chef Provisioner](https://www.terraform.io/docs/provisioners/chef.html) and it is not officially supported by Chef Software. +The [Terraform Chef Provisioner](https://www.terraform.io/docs/provisioners/chef.html) bootstraps Terraform, provisioned with Chef Infra using SSH or WinRM, and configures them to work with a [Chef Infra Server](/server/). Standard bootstrap options such as Chef Infra versions, secrets, proxies, and assigning run lists using Policyfiles or Roles and Environments are all supported. The referenced documentation provides a complete list of supported options and an example of usage. HashiCorp provides support for the [Terraform Chef Provisioner](https://www.terraform.io/docs/provisioners/chef.html) and it's not officially supported by Chef Software. ### Terraform and Chef Solo @@ -47,7 +47,7 @@ resource "aws_instance" "web" { ## Chef Infra Provider -The [Terraform Chef Provider](https://www.terraform.io/docs/providers/chef/index.html) allows you to manage Chef Infra Server resources (nodes, data bags, etc.) using the Chef Infra Server API. Policyfiles, cookbooks, clients, and ACLs are not currently managed with the Provider. The [Terraform Chef Provider documentation](https://www.terraform.io/docs/providers/chef/index.html) provides a complete list of supported options and an example of usage. HashiCorp provides support for the Terraform Chef Provider and it is not officially supported by Chef Software. +The [Terraform Chef Provider](https://www.terraform.io/docs/providers/chef/index.html) allows you to manage Chef Infra Server resources (nodes, data bags, etc.) using the Chef Infra Server API. Policyfiles, cookbooks, clients, and ACLs aren't currently managed with the Provider. The [Terraform Chef Provider documentation](https://www.terraform.io/docs/providers/chef/index.html) provides a complete list of supported options and an example of usage. HashiCorp provides support for the Terraform Chef Provider and it's not officially supported by Chef Software. ## Additional Terraform Integrations diff --git a/content/unified_mode.md b/content/unified_mode.md index 7d90a3a5f5..a5b15cf648 100644 --- a/content/unified_mode.md +++ b/content/unified_mode.md @@ -7,6 +7,7 @@ product = ["client"] [menu] [menu.infra] + title = "Unified Mode" identifier = "chef_infra/resources/unified_mode.md Use Unified Mode" parent = "chef_infra/resources" weight = 20 @@ -14,29 +15,37 @@ product = ["client"] {{< readfile file="content/reusable/md/unified_mode_overview.md" >}} +## Availability + {{< readfile file="content/reusable/md/unified_mode_client_releases.md" >}} +## Enable Unified Mode + {{< readfile file="content/reusable/md/unified_mode_enable.md" >}} -## Unified Mode Isolation +## Unified Mode isolation -If a unified mode resource calls a non-unified mode resource, the called resource is not executed in unified mode. Each resource maintains its own state whether it is in unified mode or not. You do not need to modify a custom resource that calls a unified mode resource since the calling context will not affect the resource's execution. Resources using unified mode may call resources not using unified mode and vice versa. +If a Unified Mode resource calls a non-Unified Mode resource, the called resource isn't executed in Unified Mode. +Each resource maintains its own state whether it's in Unified Mode or not. +You don't need to modify a custom resource that calls a Unified Mode resource since the calling context won't affect the resource's execution. +Resources using Unified Mode may call resources not using Unified Mode and vice versa. ## Benefits of Unified Mode -### Single Pass Execution +### Single-pass execution -In unified mode, the Chef Infra Language executes from top to bottom, eliminating the compile and converge phases. +In Unified Mode, the Chef Infra Language executes from top to bottom, eliminating the compile and converge phases. -With the deferred execution of resources to converge time, the user has to understand many different details of the Ruby parser to understand what constructs relate to Chef Infra resources and what constructs are parts of the core Ruby language to determine when those expression are executed. All that complexity is removed in unified mode. +With the deferred execution of resources to converge time, the user has to understand many different details of the Ruby parser to understand what constructs relate to Chef Infra resources and what constructs are parts of the core Ruby language to determine when those expression are executed. All that complexity is removed in Unified Mode. -### Elimination of Lazy Blocks +### Elimination of lazy blocks -Several aspects of the Chef Infra Language still work but are no longer necessary in unified mode. Unified mode eliminates the need for lazy blocks and the need to lazy Ruby code through a Ruby block. +Several aspects of the Chef Infra Language still work but are no longer necessary in Unified Mode. +Unified Mode eliminates the need for lazy blocks and the need to lazy Ruby code through a Ruby block. -### Rescue Blocks And Other Ruby Constructs Work Correctly +### Rescue blocks and other Ruby constructs work correctly -In unified mode, it is now easy to write a rescue wrapper around a Chef Infra resource: +In Unified Mode, it's now easy to write a rescue wrapper around a Chef Infra resource: ```ruby begin @@ -50,11 +59,11 @@ end ## Examples -### Basic Example +### Basic example A simple motivating example is to have a resource that downloads a JSON message using the [remote_file]({{< relref "/resources/remote_file" >}}) resource, parse the JSON using the [ruby_block]({{< relref "/resources/ruby_block" >}}), and then render a value into a [file]({{< relref "/resources/file" >}}) or [template]({{< relref "/resources/template" >}}) resource. -Without unified mode, correctly writing this simple resource is complicated: +Without Unified Mode, correctly writing this simple resource is complicated: ```ruby provides :downloader @@ -78,9 +87,9 @@ action :doit do end ``` -Since the remote_file and file resources execute at converge time, the Ruby code to parse the JSON needs to be wrapped in a ruby_block resource, the local variable then needs to be declared outside of that scope (requiring a deep knowledge of Ruby variable scoping rules), and then the content rendered into the file resource must be wrapped with `lazy` since the Ruby parses all arguments of properties at compile time instead of converge time. +Since the remote_file and file resources execute at converge time, the Ruby code to parse the JSON needs to be wrapped in a `ruby_block` resource, the local variable then needs to be declared outside of that scope (requiring a deep knowledge of Ruby variable scoping rules), and then the content rendered into the file resource must be wrapped with `lazy` since the Ruby parses all arguments of properties at compile time instead of converge time. -Unified mode simplifies this resource: +Unified Mode simplifies this resource: ```ruby unified_mode true @@ -100,9 +109,9 @@ action :doit do end ``` -Unified mode eliminates the need for the ruby_block resource, the `lazy` evaluation, and the variable declaration, simplifying how the cookbook is authored. +Unified Mode eliminates the need for the `ruby_block` resource, the `lazy` evaluation, and the variable declaration, simplifying how the cookbook is authored. -### Recovery and Exception Handling +### Recovery and exception handling Another advantage is in error recovery and the use of rescue. @@ -116,7 +125,7 @@ action :install do # the downloading of this file acts as a guard for all the later # resources -- but if the download is successful while the later - # resources fail for some transient issue, will will not redownload on + # resources fail for some transient issue, will won't redownload on # the next run -- we lose our edge trigger. # remote_file "/tmp/redis-#{version}.tar.gz" do @@ -146,13 +155,13 @@ action :install do end ``` -This simplified example shows how to trap exceptions from resources using normal Ruby syntax and to clean up the resource. Without unified mode, this syntax is impossible. Normally when the [execute]({{< relref "resources/execute" >}}) resources are parsed, they only create the objects in the `resource_collection` to later be evaluated so that no exception is thrown while Ruby is parsing the `action` block. Every action is delayed to the later converge phase. In unified mode, the resource runs when Ruby is done parsing its block, so exceptions happen in-line with Ruby parsing and the rescue clause now works as expected. +This simplified example shows how to trap exceptions from resources using normal Ruby syntax and to clean up the resource. Without Unified Mode, this syntax is impossible. Normally when the [execute]({{< relref "resources/execute" >}}) resources are parsed, they only create the objects in the `resource_collection` to later be evaluated so that no exception is thrown while Ruby is parsing the `action` block. Every action is delayed to the later converge phase. In Unified Mode, the resource runs when Ruby is done parsing its block, so exceptions happen in-line with Ruby parsing and the rescue clause now works as expected. -This is useful because the TAR extraction throws an exception (for example, the node could be out of disk space), which deletes the TAR file. The next time Chef Infra Client runs, the TAR file will be redownload. If the resource did not have file cleanup after an exception, the TAR file would remain on the client node even though the resource is not complete and the extraction did not happen, leaving the resource in a broken, indeterminate state. +This is useful because the TAR extraction throws an exception (for example, the node could be out of disk space), which deletes the TAR file. The next time Chef Infra Client runs, the TAR file will be redownload. If the resource didn't have file cleanup after an exception, the TAR file would remain on the client node even though the resource isn't complete and the extraction didn't happen, leaving the resource in a broken, indeterminate state. {{< readfile file="content/reusable/md/unified_mode_actions_later_resources.md" >}} -### Notifications and Accumulators +### Notifications and accumulators The accumulator pattern works unchanged. Notifications to the `:root` run context still behave identically. Since the compile and converge phases of custom resources both fire in the converge time (typically) of the enclosing `run_context`, the effect of eliminating the separate compile and converge phases of the custom resource has no visible effect from the outer context. diff --git a/content/uninstall.md b/content/uninstall.md index 6c650b0115..6c8d7ca1f8 100644 --- a/content/uninstall.md +++ b/content/uninstall.md @@ -55,7 +55,7 @@ sudo pkgutil --forget com.getchef.pkg.chef-workstation To remove symlinks: > ```bash -> sudo find /usr/local/bin -lname '`/opt/chef-workstation/*' -delete +> sudo find /usr/local/bin -lname '/opt/chef-workstation/*' -delete > ``` ### Red Hat Enterprise Linux diff --git a/content/versions.md b/content/versions.md index a658d9a3e3..fe0a6878ca 100644 --- a/content/versions.md +++ b/content/versions.md @@ -13,16 +13,14 @@ product = ["automate", "client", "server", "habitat", "inspec", "supermarket", " weight = 10 +++ -This section lists the free and commercial Chef products and versions we -currently support. The lifecycle stage defines the involvement by Chef -Software in updating and maintaining each product. +This section lists the free and commercial Chef products and versions we currently support. +The lifecycle stage defines the involvement by Chef Software in updating and maintaining each product. -## Lifecycle Definitions +## Lifecycle definitions ### Generally Available (GA) -This stage indicates that the product or version is in active -development and/or maintenance. +This stage indicates that the product or version is in active development and/or maintenance. - Chef continues to provide releases to the application or version in response to customer needs and security vulnerabilities - Chef welcomes customer feature requests for the product roadmap for the application @@ -44,7 +42,7 @@ This stage indicates that Chef has set a date after which the application or version will no longer be supported or recommended for use by customers. -### Versions and Status +### Versions and status {{< important >}} @@ -54,7 +52,7 @@ Unless otherwise stated, versions older than those listed below are EOL. {{< /important >}} -## Supported Commercial Distributions +## Supported commercial distributions Use of these and later versions of these distributions must be in accordance with the [Chef End User License @@ -73,13 +71,13 @@ commercial agreement with Chef. Additional information is available in {{< note >}} -**Chef Backend** does not directly require acceptance of the Chef +**Chef Backend** doesn't directly require acceptance of the Chef EULA, but it does have functionality that requires its acceptance in other products. {{< /note >}} -## Supported Free Distributions +## Supported free distributions Use of the following distributions is governed by the Apache License, version 2.0. @@ -88,20 +86,20 @@ version 2.0. |-------------|---------|------------------|----------| | Supermarket | 5.x | GA | TBD | -## Deprecated Products and Versions +## Deprecated products and versions The following products are deprecated. Users are advised to move to newer versions or products. -| Product | Version | Lifecycle Status | EOL Date | -|-------------------|---------|------------------|-------------------| -| Chef Backend | 3.x | Deprecated | TBD | -| Chef Infra Client | 17.x | Deprecated | November 30, 2024 | -| Chef Infra Server | 14.x | Deprecated | TBD | -| Chef InSpec | 5.x | Deprecated | TBD | -| Chef Manage | 2.5.x+ | Deprecated | TBD | +| Product | Version | Lifecycle Status | EOL Date | +|-------------------|---------|------------------|----------------| +| Chef Backend | 3.x | Deprecated | TBD | +| Chef Infra Client | 17.x | Deprecated | March 31, 2025 | +| Chef Infra Server | 14.x | Deprecated | TBD | +| Chef InSpec | 5.x | Deprecated | TBD | +| Chef Manage | 2.5.x+ | Deprecated | TBD | -## End of Life (EOL) Products +## End of Life (EOL) products | Product | Version | Lifecycle Status | EOL Date | |--------------------------|---------------------|------------------|-------------------| diff --git a/content/vmware.md b/content/vmware.md index d8c35357e6..1c710b670f 100644 --- a/content/vmware.md +++ b/content/vmware.md @@ -72,7 +72,7 @@ created in `FOLDERNAME` instead of the root folder. {{< /note >}} -**Clone from a folder into the "Datacenter Root" directory:** +**Clone from a folder into the data center root directory:** ```bash knife vsphere vm clone MACHINENAME --template TEMPLATENAME -f /path/to/template \ @@ -235,7 +235,7 @@ knife[:vro_base_url] = 'https://vra.example.local:8281' : The number of seconds to wait for the server to complete. Increase this if your vRealize Automation environments takes more than 10 minutes to give you a server. Default value: 600 seconds. `--bootstrap-version` -: Specify a specific Chef Infra Client version if your group is not current. +: Specify a specific Chef Infra Client version if your group isn't current. #### Usage Examples @@ -244,7 +244,7 @@ knife[:vro_base_url] = 'https://vra.example.local:8281' If you want to create a server from a catalog blueprint, find the catalog ID with the `knife vra catalog list` command. After the resource is created, knife will attempt to bootstrap it. -Each blueprint may require different parameters to complete provisioning. See your vRealize Automation administrator with questions. knife will attempt to provide any helpful error messages from vRealize Automation if they are available. +Each blueprint may require different parameters to complete provisioning. See your vRealize Automation administrator with questions. knife will attempt to provide any helpful error messages from vRealize Automation if they're available. ```bash knife vra server create CATALOG_ID --name NAME --project-id PROJECT_ID \ @@ -299,7 +299,7 @@ the Chef Infra Server. **Execute a vRealize Orchestrator workflow:** -This requires the workflow name. If your workflow name is not unique in your vRealize Orchestrator workflow list, you +This requires the workflow name. If your workflow name isn't unique in your vRealize Orchestrator workflow list, you can specify a workflow ID with `--vro-workflow-id ID`. You can find the workflow ID from the vRealize Orchestrator UI; however, the workflow name is still required. ```bash @@ -336,7 +336,7 @@ Chef: - Leverages the typical Test Kitchen workflow for vCenter \> 5.0+ - There is a [kitchen-vsphere](https://rubygems.org/gems/kitchen-vsphere) gem, - but it is not supported at this time + but it's not supported at this time #### Usage Examples @@ -463,7 +463,7 @@ platforms: [[GitHub]](https://github.com/chef-partners/kitchen-vro) - An integration point with vRealize Orchestrator and Test Kitchen -- Leverages specific Workflows in vRealize Orchestrator if it is required by VMware +- Leverages specific Workflows in vRealize Orchestrator if it's required by VMware admins #### Usage Examples diff --git a/content/windows.md b/content/windows.md index cb373cba5e..24422b5500 100644 --- a/content/windows.md +++ b/content/windows.md @@ -74,7 +74,7 @@ Windows: -After Chef Infra Client is installed, it is located at `C:\opscode`. The +After Chef Infra Client is installed, it's located at `C:\opscode`. The main configuration file for Chef Infra Client is located at `C:\chef\client.rb`. @@ -106,7 +106,7 @@ main configuration file for Chef Infra Client is located at {{< readfile file="content/workstation/reusable/md/knife_windows_summary.md" >}} -Se the [knife windows](/workstation/knife_windows/) for more information. +For more information, see the [`knife windows` documentation](/workstation/knife_windows/). #### Ports diff --git a/cspell.yaml b/cspell.yaml index c984518995..65678ede40 100644 --- a/cspell.yaml +++ b/cspell.yaml @@ -6,16 +6,24 @@ version: '0.2' language: en_US dictionaries: +- 360-docs - chef - docs +- hab-docs dictionaryDefinitions: +- name: 360-docs + path: https://raw.githubusercontent.com/chef/chef_dictionary/refs/heads/main/360-docs.txt + description: Custom Chef 360 Dictionary - name: chef path: https://raw.githubusercontent.com/chef/chef_dictionary/main/chef.txt description: Custom Chef Dictionary - name: docs path: https://raw.githubusercontent.com/chef/chef_dictionary/main/docs.txt description: Custom Docs Dictionary +- name: hab-docs + path: https://raw.githubusercontent.com/chef/chef_dictionary/main/hab-docs.txt + description: Custom Habitat Docs Dictionary # flagWords - list of words to be always considered incorrect # This is useful for offensive words and common spelling errors. diff --git a/generated/config.toml b/generated/config.toml index 7cf27fce75..6dd827c86f 100644 --- a/generated/config.toml +++ b/generated/config.toml @@ -1,6 +1,6 @@ ## Config file for generated dir. -disableKinds = [ "sitemap", "taxonomy", "term", "RSS", "sitemap"] +disableKinds = [ "sitemap", "taxonomy", "term", "RSS"] publishDir = "generated_content" [module] diff --git a/go.mod b/go.mod index 4e3496b34f..544bde8d83 100644 --- a/go.mod +++ b/go.mod @@ -3,18 +3,18 @@ module github.com/chef/chef-web-docs go 1.22 require ( - github.com/chef/automate/components/docs-chef-io v0.0.0-20240926130942-4b98d9cf92f6 // indirect - github.com/chef/chef-docs-theme v0.0.0-20241022204409-d84f13a3c826 // indirect - github.com/chef/chef-server/docs-chef-io v0.0.0-20240920053744-03b58ff14f46 // indirect - github.com/chef/chef-workstation/docs-chef-io v0.0.0-20240809064339-878cb76b2b66 // indirect - github.com/chef/compliance-profiles/docs-chef-io v0.0.0-20241106111500-6a8759e49b64 // indirect + github.com/chef/automate/components/docs-chef-io v0.0.0-20250109084654-0c4aab636f65 // indirect + github.com/chef/chef-docs-theme v0.0.0-20241206202643-d5ef90c514a1 // indirect + github.com/chef/chef-server/docs-chef-io v0.0.0-20250102024827-cf7f6c08943f // indirect + github.com/chef/chef-workstation/docs-chef-io v0.0.0-20241218133915-0bcc26e757cc // indirect + github.com/chef/compliance-profiles/docs-chef-io v0.0.0-20241211025148-fb9cb1f3e2bc // indirect github.com/chef/compliance-remediation-2022/docs-chef-io v0.0.0-20240313054833-ebbc45209efa // indirect github.com/chef/desktop-config/docs-chef-io v0.0.0-20240814044820-5af667d41a43 // indirect github.com/chef/effortless/docs-chef-io v0.0.0-20230711123605-c8beb79aba4f // indirect github.com/chef/license-service/docs-chef-io v0.0.0-20231117105514-d3f3d53ba2dd // indirect github.com/chef/supermarket/docs-chef-io v0.0.0-20241105172430-a362eded8f72 // indirect github.com/cowboy/jquery-hashchange v0.0.0-20100902193700-0310f3847f90 // indirect - github.com/habitat-sh/habitat/components/docs-chef-io v0.0.0-20240410132404-ec6d25dc198b // indirect + github.com/habitat-sh/habitat/components/docs-chef-io v0.0.0-20241227173243-de19b906a228 // indirect github.com/inspec/inspec-alicloud/docs-chef-io v0.0.0-20240122032124-a1d2a214e170 // indirect github.com/inspec/inspec-aws/docs-chef-io v0.0.0-20240122032232-049dcf822eef // indirect github.com/inspec/inspec-azure/docs-chef-io v0.0.0-20240122032234-c1394fc25525 // indirect diff --git a/go.sum b/go.sum index e2a9d9284c..7e532bea75 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,13 @@ -github.com/chef/automate/components/docs-chef-io v0.0.0-20240926130942-4b98d9cf92f6 h1:scrWEAK18Peqbtc3CxwxVaFp595kr+r8eYvYxW7qjQU= -github.com/chef/automate/components/docs-chef-io v0.0.0-20240926130942-4b98d9cf92f6/go.mod h1:juvLC7Rt33YOCgJ5nnfl4rWZRAbSwqjTbWmcAoA0LtU= -github.com/chef/chef-docs-theme v0.0.0-20241022204409-d84f13a3c826 h1:ga5wgtTZN/1eR44zBJ5umO7vlXjM+j2UER0Gx3KCxz0= -github.com/chef/chef-docs-theme v0.0.0-20241022204409-d84f13a3c826/go.mod h1:+Jpnv+LXE6dXu2xDcMzMc0RxRGuCPAoFxq5tJ/X6QpQ= -github.com/chef/chef-server/docs-chef-io v0.0.0-20240920053744-03b58ff14f46 h1:KKSufg3MDKPPzXN2Nv6vUGhx8LIYmYMo9ByQMFbj8Rk= -github.com/chef/chef-server/docs-chef-io v0.0.0-20240920053744-03b58ff14f46/go.mod h1:gMSa25GUHmLimA0gjvRd3hs1buOBqkKPrdHzHvaJauY= -github.com/chef/chef-workstation/docs-chef-io v0.0.0-20240809064339-878cb76b2b66 h1:mGSa2uVyyi8bHyluwmmd83UReZR9gqF/roi5v7lnv0s= -github.com/chef/chef-workstation/docs-chef-io v0.0.0-20240809064339-878cb76b2b66/go.mod h1:u6KNpAJs9lTmRigxXsxX0dEywa5KLB40m1vbAalN0NI= -github.com/chef/compliance-profiles/docs-chef-io v0.0.0-20241106111500-6a8759e49b64 h1:99aFQUpNaGl3GnAeE8EwH5BI8R8mzWHX7vOLUAzw1pw= -github.com/chef/compliance-profiles/docs-chef-io v0.0.0-20241106111500-6a8759e49b64/go.mod h1:fsG7S6r66ZW6Af/sqq+OL3WNP+BoO4V1/Evwu98Noig= +github.com/chef/automate/components/docs-chef-io v0.0.0-20250109084654-0c4aab636f65 h1:9B9FOW9UjPo2jG0KkqWzzW9fDv0fVMJ/mTdiHuUfGEA= +github.com/chef/automate/components/docs-chef-io v0.0.0-20250109084654-0c4aab636f65/go.mod h1:juvLC7Rt33YOCgJ5nnfl4rWZRAbSwqjTbWmcAoA0LtU= +github.com/chef/chef-docs-theme v0.0.0-20241206202643-d5ef90c514a1 h1:1ASUjeDFUBsmMX6mMlqxYN4mGtsS4lJ7AkyYiw3FOd4= +github.com/chef/chef-docs-theme v0.0.0-20241206202643-d5ef90c514a1/go.mod h1:+Jpnv+LXE6dXu2xDcMzMc0RxRGuCPAoFxq5tJ/X6QpQ= +github.com/chef/chef-server/docs-chef-io v0.0.0-20250102024827-cf7f6c08943f h1:LjlFqIxJ0XgVlL91LvEjLwY2NHqsYK0vAlIOqd9HWzA= +github.com/chef/chef-server/docs-chef-io v0.0.0-20250102024827-cf7f6c08943f/go.mod h1:gMSa25GUHmLimA0gjvRd3hs1buOBqkKPrdHzHvaJauY= +github.com/chef/chef-workstation/docs-chef-io v0.0.0-20241218133915-0bcc26e757cc h1:LYYo5bwhYsmdpLx53uKaOpRiGjFh4tWACjK+6XA7Eok= +github.com/chef/chef-workstation/docs-chef-io v0.0.0-20241218133915-0bcc26e757cc/go.mod h1:u6KNpAJs9lTmRigxXsxX0dEywa5KLB40m1vbAalN0NI= +github.com/chef/compliance-profiles/docs-chef-io v0.0.0-20241211025148-fb9cb1f3e2bc h1:1XQ9lU2HIVdaJDmbZC3zptA6mGoOSwi6vs67wZgVRrw= +github.com/chef/compliance-profiles/docs-chef-io v0.0.0-20241211025148-fb9cb1f3e2bc/go.mod h1:fsG7S6r66ZW6Af/sqq+OL3WNP+BoO4V1/Evwu98Noig= github.com/chef/compliance-remediation-2022/docs-chef-io v0.0.0-20240313054833-ebbc45209efa h1:H2kX1/99ggT3YoLlO6xe7FuqsWl0dETD0OXUvKCWrII= github.com/chef/compliance-remediation-2022/docs-chef-io v0.0.0-20240313054833-ebbc45209efa/go.mod h1:kNxSqzNZGBwfF4AfALPzUfOeAsscIIKq8vyoCNL33DA= github.com/chef/desktop-config/docs-chef-io v0.0.0-20240814044820-5af667d41a43 h1:2wrzLEbX7qPYQRw/LTBm2pHB5HKyL9ElYUA7bkYScaE= @@ -20,8 +20,8 @@ github.com/chef/supermarket/docs-chef-io v0.0.0-20241105172430-a362eded8f72 h1:m github.com/chef/supermarket/docs-chef-io v0.0.0-20241105172430-a362eded8f72/go.mod h1:D+9mmEZxCwpdhZ8LrEODBWMwMufmJUubSt5NlU/lLB4= github.com/cowboy/jquery-hashchange v0.0.0-20100902193700-0310f3847f90 h1:p/a5iSATj0OjrqJLX/YKxYdGXhZzW58yyyNIC4JY4S0= github.com/cowboy/jquery-hashchange v0.0.0-20100902193700-0310f3847f90/go.mod h1:N/6F0+wmdvL6k0AjqyKIncMRClKAN92atjZdTLtYMaw= -github.com/habitat-sh/habitat/components/docs-chef-io v0.0.0-20240410132404-ec6d25dc198b h1:Ro7cUmzy6EEKQSUdIO+Avfw8qDIQitQUY/lVdD6Za2g= -github.com/habitat-sh/habitat/components/docs-chef-io v0.0.0-20240410132404-ec6d25dc198b/go.mod h1:5GKz/BtTWeTr8vdVQPkvGDQkQ+xiGWLkDsPOXhu2Ps4= +github.com/habitat-sh/habitat/components/docs-chef-io v0.0.0-20241227173243-de19b906a228 h1:ur/oWo1IJqxeT4DAOHUUh3sIBd/x8cXJYb5nNA8+VMc= +github.com/habitat-sh/habitat/components/docs-chef-io v0.0.0-20241227173243-de19b906a228/go.mod h1:5GKz/BtTWeTr8vdVQPkvGDQkQ+xiGWLkDsPOXhu2Ps4= github.com/inspec/inspec-alicloud/docs-chef-io v0.0.0-20240122032124-a1d2a214e170 h1:Q9jEEyv8nZAN5NgJXwMoqjngSz6Bc5ruNc9V72Hk4b4= github.com/inspec/inspec-alicloud/docs-chef-io v0.0.0-20240122032124-a1d2a214e170/go.mod h1:tAazDDBtR5yCl/FNWHnrmkxpfxnOo9B99DyfRE7JH1c= github.com/inspec/inspec-aws/docs-chef-io v0.0.0-20240122032232-049dcf822eef h1:r+GoVO6zbIAtusZ2w6MwUhtDAJicQkYbX0iWwZmuXfQ= diff --git a/hugo.toml b/hugo.toml index 13b3eaefa7..ce942dda6d 100644 --- a/hugo.toml +++ b/hugo.toml @@ -7,24 +7,34 @@ pluralizeListTitles = false disableKinds = ["taxonomy", "term"] configDir = "config" -# We do redirects using Netlify's _redirects file, generated by Hugo (see "outputs" below). disableAliases = true # Summary length summaryLength = 20 + +# We do redirects using Netlify's _redirects file, generated by Hugo. +# See the REDIR output and output format and the text/netlify mediatype. [outputs] -home = [ "HTML", "RSS", "REDIR" ] -section = [ "HTML", "RSS" ] + home = [ "HTML", "RSS", "REDIR", "SITEMAP-MAIN" ] + section = [ "HTML", "RSS" ] [mediaTypes] -[mediaTypes."text/netlify"] -delimiter = "" + [mediaTypes."text/netlify"] + delimiter = "" [outputFormats] -[outputFormats.REDIR] -mediatype = "text/netlify" -baseName = "_redirects" -isPlainText = true -notAlternative = true + [outputFormats.REDIR] + mediatype = "text/netlify" + baseName = "_redirects" + isPlainText = true + notAlternative = true + + [outputFormats.SITEMAP-MAIN] + MediaType = "application/xml" + BaseName = "sitemap-main" + IsHTML = false + IsPlainText = true + Rel = "sitemap" + protocol = "xml://" [markup] [markup.goldmark] @@ -60,24 +70,3 @@ notAlternative = true endLevel = 4 ordered = false startLevel = 2 - -[caches] - [caches.assets] - dir = ':resourceDir/_gen' - maxAge = -1 - [caches.getcsv] - dir = ':cacheDir/:project' - maxAge = -1 - [caches.getjson] - dir = ':cacheDir/:project' - maxAge = "1h" - [caches.getresource] - dir = ':cacheDir/:project' - maxAge = "1h" - [caches.images] - dir = ':resourceDir/_gen' - maxAge = -1 - [caches.modules] - dir = ':cacheDir/modules' - maxAge = -1 - diff --git a/layouts/_default/home.sitemap-main.xml b/layouts/_default/home.sitemap-main.xml new file mode 100644 index 0000000000..fe3ec2fa14 --- /dev/null +++ b/layouts/_default/home.sitemap-main.xml @@ -0,0 +1,26 @@ +{{ printf "" | safeHTML }} + +{{ range .Site.Pages }} + {{- if or (eq (isset .Params "sitemapexclude") false) (ne .Params.sitemapExclude true) }} + + {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} + {{ end }} + {{ end }} + + {{- end }} +{{ end }} + + + diff --git a/layouts/_default/sitemap.xml b/layouts/_default/sitemap.xml new file mode 100644 index 0000000000..f7beb7f9b3 --- /dev/null +++ b/layouts/_default/sitemap.xml @@ -0,0 +1,11 @@ +{{ printf "" | safeHTML }} + +{{- range .Site.Params.sitemaps }} + + {{ . }} + +{{ end -}} + + + + diff --git a/netlify.toml b/netlify.toml index 67cde9b30e..abf09dc5a8 100644 --- a/netlify.toml +++ b/netlify.toml @@ -66,3 +66,13 @@ from = "/360/1.0/*" to = "https://release-1-0--chef-360.netlify.app/360/1.0/:splat" status = 200 + +[[redirects]] + from = "/360/1.1/*" + to = "https://release-1-1--chef-360.netlify.app/360/1.1/:splat" + status = 200 + +[[redirects]] + from = "/client/rc1/*" + to = "https://release-rc1--chef-infra-client.netlify.app/client/rc1/:splat" + status = 200 diff --git a/package-lock.json b/package-lock.json index ecfa21820a..28af8a43cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -472,15 +472,16 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "peer": true, "bin": { "nanoid": "bin/nanoid.cjs" diff --git a/scripts/netlify-deploy-production.sh b/scripts/netlify-deploy-production.sh index c5fd8f363f..98a80e0020 100644 --- a/scripts/netlify-deploy-production.sh +++ b/scripts/netlify-deploy-production.sh @@ -21,4 +21,4 @@ rm dart-sass-$DART_SASS_VERSION-linux-x64.tar.gz export PATH=/opt/build/repo/dart-sass:$PATH npm install -hugo --gc --minify --enableGitInfo +hugo --gc --minify --enableGitInfo --ignoreCache diff --git a/tools/vale/chef/brands.yml b/tools/vale/chef/brands.yml index dfaef07c5e..2d05a9bb96 100644 --- a/tools/vale/chef/brands.yml +++ b/tools/vale/chef/brands.yml @@ -5,7 +5,6 @@ ignorecase: false swap: 'Microsoft Windows': Windows ' windows ': Windows - 'linux': Linux + '(?