Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown formatting. #2477

Merged
merged 1 commit into from
Dec 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs-chef-io/content/supermarket/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ aliases = ["/supermarket.html"]

## Public Supermarket

The public Chef Supermarket hosted by Chef Software is located at [Chef
Supermarket](https://supermarket.chef.io/).
The public Chef Supermarket hosted by Chef Software is located at [Chef Supermarket](https://supermarket.chef.io/).

To interact with the public Chef Supermarket, use [knife
supermarket](/workstation/knife_supermarket/) commands.
To interact with the public Chef Supermarket, use [knife supermarket](/workstation/knife_supermarket/) commands.

{{< figure src="/images/public_supermarket.svg" width="700" alt="Image showing the Chef Supermarket website." >}}

Expand Down
7 changes: 2 additions & 5 deletions docs-chef-io/content/supermarket/config_rb_supermarket.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ The following settings are available in the `/etc/supermarket/supermarket.rb` fi

{{< note >}}

You must run `supermarket-ctl reconfigure` to apply any changes made in
the `supermarket.rb` file.
You must run `supermarket-ctl reconfigure` to apply any changes made in the `supermarket.rb` file.

{{< /note >}}

Expand All @@ -47,8 +46,7 @@ This configuration file has the following general settings:

`default['supermarket']['features']`

: Use to enable additional features, such as announcements and GitHub
integration. Default value: `'tools'`.
: Use to enable additional features, such as announcements and GitHub integration. Default value: `'tools'`.

Features currently available: `tools`, `fieri`, `announcement`, `github`, and `no_crawl`.

Expand Down Expand Up @@ -203,7 +201,6 @@ As a Supermarket feature, GitHub must be enabled via the`default['supermarket'][

Use these settings to integrate Supermarket with GitHub Enterprise.


`default['supermarket']['github_access_token']`

: The access token created from your GitHub Enterprise account. Default value:`nil`.
Expand Down
187 changes: 48 additions & 139 deletions docs-chef-io/content/supermarket/ctl_supermarket.md

Large diffs are not rendered by default.

265 changes: 61 additions & 204 deletions docs-chef-io/content/supermarket/install_supermarket.md

Large diffs are not rendered by default.

106 changes: 23 additions & 83 deletions docs-chef-io/content/supermarket/supermarket_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ The response is similar to:

#### GET

The `GET` method is used to get a listing of the available cookbooks.
Use the `start` and `items` parameters to set limits on the number of
cookbooks returned. Use the `order` parameter to change the way results
are sorted. Use the `user` parameter to filter cookbooks by maintainer:
The `GET` method is used to get a listing of the available cookbooks. Use the `start` and `items` parameters to set limits on the number of cookbooks returned. Use the `order` parameter to change the way results are sorted. Use the `user` parameter to filter cookbooks by maintainer:

<table>
<colgroup>
Expand Down Expand Up @@ -139,11 +136,7 @@ GET /api/v1/cookbooks?user=smith

**Response**

The response will return the name of the cookbook, a description, URI,
the name of the individual who maintains the cookbook. In addition, the
total number of cookbooks on Supermarket API is shown, as well (if
`start` is specified) the point at which the list of returned cookbooks
began:
The response will return the name of the cookbook, a description, URI, the name of the individual who maintains the cookbook. In addition, the total number of cookbooks on Supermarket API is shown, as well (if `start` is specified) the point at which the list of returned cookbooks began:

```javascript
{
Expand Down Expand Up @@ -201,8 +194,7 @@ began:

### /cookbooks/NAME

The `cookbooks/[NAME]` endpoint allows a specific cookbook to be
accessed. This endpoint has the following methods: `DELETE` and `GET`.
The `cookbooks/[NAME]` endpoint allows a specific cookbook to be accessed. This endpoint has the following methods: `DELETE` and `GET`.

#### DELETE

Expand Down Expand Up @@ -281,11 +273,7 @@ GET /api/v1/cookbooks/COOKBOOK_NAME

**Response**

The response will return details for a cookbook, including name of the
cookbook, the category to which it belongs, the name of the individual
who maintains the cookbook, the URI for the latest version and previous
versions, its description, and so on it also includes metrics about the
cookbooks namely number of downloads and followers:
The response will return details for a cookbook, including name of the cookbook, the category to which it belongs, the name of the individual who maintains the cookbook, the URI for the latest version and previous versions, its description, and it also includes metrics about the cookbooks namely number of downloads and followers:

```javascript
{
Expand Down Expand Up @@ -317,8 +305,7 @@ cookbooks namely number of downloads and followers:
}
```

If a cookbook is deprecated, that status is noted by the `deprecated`
field (being `true`):
If a cookbook is deprecated, that status is noted by the `deprecated` field (being `true`):

```javascript
{
Expand Down Expand Up @@ -360,12 +347,7 @@ field (being `true`):

### /cookbooks/VERSION

A cookbook version always takes the form x.y.z, where x, y, and z are
decimal numbers that are used to represent major (x), minor (y), and
patch (z) versions. A two-part version (x.y) is also allowed. When
passing a cookbook version using this method, underscores ("_") should
be used as the separator between versions. For example, a cookbook with
a version 1.0.1 would be 1_0_1.
A cookbook version always takes the form x.y.z, where x, y, and z are decimal numbers that are used to represent major (x), minor (y), and patch (z) versions. A two-part version (x.y) is also allowed. When passing a cookbook version using this method, underscores ("_") should be used as the separator between versions. For example, a cookbook with a version 1.0.1 would be 1_0_1.

The `/cookbooks/[VERSION]` endpoint has the following methods: `DELETE`
and `GET`.
Expand Down Expand Up @@ -456,10 +438,7 @@ GET /api/v1/cookbooks/COOKBOOK_NAME/versions/VERSION

**Response**

The response will return details for a cookbook version, including the
license under which the cookbook is distributed, the most recent update,
version, URI, date of cookbook creation, path to the cookbook's tar.gz
file, its dependencies and platforms it supports and so on:
The response will return details for a cookbook version, including the license under which the cookbook is distributed, the most recent update, version, URI, date of cookbook creation, path to the cookbook's tar.gz file, its dependencies and platforms it supports and more:

```javascript
{
Expand Down Expand Up @@ -507,16 +486,13 @@ file, its dependencies and platforms it supports and so on:

### /search

Search performs a fuzzy, keyword search on cookbook names, cookbook
descriptions, and the cookbook owners' usernames.
Search performs a fuzzy, keyword search on cookbook names, cookbook descriptions, and the cookbook owners' usernames.

The `/search` endpoint has the following methods: `GET`.

#### GET

The `GET` method is used to get a list of cookbooks that match a search
query. Use the `start` and `items` parameters to set limits on the
number of cookbooks returned:
The `GET` method is used to get a list of cookbooks that match a search query. Use the `start` and `items` parameters to set limits on the number of cookbooks returned:

<table>
<colgroup>
Expand Down Expand Up @@ -559,13 +535,7 @@ GET /api/v1/search?q=SEARCH_QUERY&start=START&items=ITEMS

**Response**

The response will return a list of cookbooks by name and description and
will return a list of cookbooks that match the search query. Each
returned data set will include the name of the cookbook, a description,
the URI, and the name of the individual who maintains the cookbook. In
addition, the total number of cookbooks on Supermarket API is shown, as
well (if `start` is specified) the point at which the list of returned
cookbooks began:
The response will return a list of cookbooks by name and description and will return a list of cookbooks that match the search query. Each returned data set will include the name of the cookbook, a description, the URI, and the name of the individual who maintains the cookbook. In addition, the total number of cookbooks on Supermarket API is shown, as well (if `start` is specified) the point at which the list of returned cookbooks began:

```javascript
{
Expand Down Expand Up @@ -609,15 +579,11 @@ cookbooks began:

### /tools

The `tools` endpoint allows Chef Supermarket tools to be accessed. This
endpoint has the following methods: `GET`.
The `tools` endpoint allows Chef Supermarket tools to be accessed. This endpoint has the following methods: `GET`.

#### GET

The `GET` method is used to get a listing of the available tools. Use
the `start` and `items` parameters to set limits on the number of tools
returned. Use the `order` parameter to change the way results are
sorted.
The `GET` method is used to get a listing of the available tools. Use the `start` and `items` parameters to set limits on the number of tools returned. Use the `order` parameter to change the way results are sorted.

<table>
<colgroup>
Expand Down Expand Up @@ -660,10 +626,7 @@ GET /api/v1/tools?order=recently_added

**Response**

The response will return the name of the tool, a type, description,
owner, source URL and URI. In addition, the total number of tools on
Supermarket API is shown, as well (if `start` is specified) the point at
which the list of returned tools began:
The response will return the name of the tool, a type, description, owner, source URL and URI. In addition, the total number of tools on Supermarket API is shown, as well (if `start` is specified) the point at which the list of returned tools began:

```javascript
{
Expand Down Expand Up @@ -719,14 +682,11 @@ which the list of returned tools began:

### /tools-search

The `tools` endpoint allows Chef Supermarket tools to be searched. This
endpoint has the following methods: `GET`.
The `tools` endpoint allows Chef Supermarket tools to be searched. This endpoint has the following methods: `GET`.

#### GET

The `GET` method is used to get a list of tools that match a search
query. Use the `start` and `items` parameters to set limits on the
number of tools returned:
The `GET` method is used to get a list of tools that match a search query. Use the `start` and `items` parameters to set limits on the number of tools returned:

<table>
<colgroup>
Expand Down Expand Up @@ -769,12 +729,7 @@ GET /api/v1/tools-search?q=SEARCH_QUERY&start=START&items=ITEMS

**Response**

The response will return a list of tools that match the search query.
Each returned data set will include the name of the tool, a type,
description, owner, source URL and URI. In addition, the total number of
tools that match the query on Supermarket API is shown, as well (if
`start` is specified) the point at which the list of returned tools
began:
The response will return a list of tools that match the search query. Each returned data set will include the name of the tool, a type, description, owner, source URL and URI. In addition, the total number of tools that match the query on Supermarket API is shown, as well (if `start` is specified) the point at which the list of returned tools began:

```javascript
{
Expand Down Expand Up @@ -814,8 +769,7 @@ began:

### /tools/SLUG

The `tools/[SLUG]` endpoint allows a specific tool to be accessed. This
endpoint has the following methods: `GET`.
The `tools/[SLUG]` endpoint allows a specific tool to be accessed. This endpoint has the following methods: `GET`.

#### GET

Expand All @@ -831,9 +785,7 @@ GET /api/v1/tools/TOOL_SLUG

**Response**

The response will return details for a tool, including the name of the
tool, a type, description, owner, source URL and install instructions as
markdown:
The response will return details for a tool, including the name of the tool, a type, description, owner, source URL and install instructions as markdown:

```javascript
{
Expand Down Expand Up @@ -877,14 +829,9 @@ markdown:

### /universe

The universe is the known collection of cookbooks that have been
uploaded to Chef Supermarket. The universe is JSON data organized by
cookbook, then by cookbook version, and then by a dependency graph that
lists each dependency a cookbook version may have on other cookbooks or
cookbook versions.
The universe is the known collection of cookbooks that have been uploaded to Chef Supermarket. The universe is JSON data organized by cookbook, then by cookbook version, and then by a dependency graph that lists each dependency a cookbook version may have on other cookbooks or cookbook versions.

Use the `/universe` endpoint to retrieve the known collection of
cookbooks, and then use it with Berkshelf.
Use the `/universe` endpoint to retrieve the known collection of cookbooks, and then use it with Berkshelf.

The `/universe` endpoint has the following methods: `GET`.

Expand All @@ -902,9 +849,7 @@ GET /universe

**Response**

The response will return an embedded hash, with the name of each
cookbook as a top-level key. Each cookbook will list each version, along
with its location information and dependencies:
The response will return an embedded hash, with the name of each cookbook as a top-level key. Each cookbook will list each version, along with its location information and dependencies:

```javascript
{
Expand Down Expand Up @@ -960,8 +905,7 @@ with its location information and dependencies:

### /users/USERNAME

The `users/[USERNAME]` endpoint allows a specific Chef Supermarket user
to be accessed. This endpoint has the following methods: `GET`.
The `users/[USERNAME]` endpoint allows a specific Chef Supermarket user to be accessed. This endpoint has the following methods: `GET`.

#### GET

Expand All @@ -977,11 +921,7 @@ GET /api/v1/users/USERNAME

**Response**

The response will return details for a user, including their name, Chef
username, associated account details, and a list of cookbooks and tools
that are associated with the user. Cookbooks are grouped into three
categories: those that are owned by this user, those in which this user
has collaborated, and those that are followed.
The response will return details for a user, including their name, Chef username, associated account details, and a list of cookbooks and tools that are associated with the user. Cookbooks are grouped into three categories: those that are owned by this user, those in which this user has collaborated, and those that are followed.

```javascript
{
Expand Down
44 changes: 12 additions & 32 deletions docs-chef-io/content/supermarket/supermarket_backup_restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,13 @@ aliases = ["/supermarket_backup_restore.html", "/supermarket_backup_restore/"]
weight = 40
+++

Periodic backups of Supermarket data are an essential part of managing
and maintaining a healthy configuration, and to help ensure that
important data can be restored if required. In a typical installation of
Supermarket, both the cookbook store and the database need to be backed
up on a regular basis.
Periodic backups of Supermarket data are an essential part of managing and maintaining a healthy configuration, and to help ensure that important data can be restored if required. In a typical installation of Supermarket, both the cookbook store and the database need to be backed up on a regular basis.

## Backup

### Cookbook Backup

If Supermarket is not configured to use AWS S3 storage for cookbooks,
then the local cookbook storage location on the Supermarket server will
need to be backed up.
If Supermarket is not configured to use AWS S3 storage for cookbooks, then the local cookbook storage location on the Supermarket server will need to be backed up.

The default location is: `/var/opt/supermarket/data/cookbook_versions`.

Expand All @@ -39,33 +33,22 @@ tar cvzf ~/supermarket_cookbook_versions.tar.gz cookbook_versions

A database export can be made in several formats.

For example, a database export in a .dump format can be made with the
following syntax:
For example, a database export in a .dump format can be made with the following syntax:

```bash
/opt/supermarket/embedded/bin/pg_dump --host localhost --username supermarket --dbname supermarket --port 15432 --format c --blobs --verbose --file ~/supermarket_database_backup.dump
```

where, in a typical installation:

: - `/opt/supermarket/embedded/bin/pg_dump` is the path to the
database export utility included in the Supermarket installation
: - `/opt/supermarket/embedded/bin/pg_dump` is the path to the database export utility included in the Supermarket installation
- `localhost` may alternatively be 127.0.0.1
- `15432` is the PostgreSQL port number, which may need to be
modified
- `--format c` sets the output to PostgreSQL's "custom" binary
file format

Be sure to update the various local values in the `pg_dump` command as
necessary to match your infrastructure. For documentation about the
pg_dump utility, see:
<https://www.postgresql.org/docs/9.3/app-pgdump.html>

To find local variables, look at
`/etc/supermarket/supermarket-running.json`. This file lives next to
`supermarket.rb` and `supermarket.json` where their configuration is
set. `supermarket-running.json` contains the final values the system is
operating with after running `sudo supermarket-ctl reconfigure`.
- `15432` is the PostgreSQL port number, which may need to be modified
- `--format c` sets the output to PostgreSQL's "custom" binary file format

Be sure to update the various local values in the `pg_dump` command as necessary to match your infrastructure. For documentation about the pg_dump utility, see the [pgdump](https://www.postgresql.org/docs/9.3/app-pgdump.html) documentation.

To find local variables, look at `/etc/supermarket/supermarket-running.json`. This file lives next to `supermarket.rb` and `supermarket.json` where their configuration is set. `supermarket-running.json` contains the final values the system is operating with after running `sudo supermarket-ctl reconfigure`.

There's a "database" key in `supermarket-running.json`:

Expand All @@ -92,8 +75,7 @@ There's a "database" key in `supermarket-running.json`:

### Cookbook Restore

When restoring cookbooks, **make sure the cookbook directory is writable
by the Supermarket user.**
When restoring cookbooks, **make sure the cookbook directory is writable by the Supermarket user.**

For example, to restore your cookbook files, run:

Expand All @@ -106,9 +88,7 @@ tar xvzf /supermarket_cookbook_versions.tar.gz

{{< note >}}

The restore does not support transferring backups across different
versions of Supermarket. Backups taken must be restored to the same
version of Supermarket that was in use when they were created.
The restore does not support transferring backups across different versions of Supermarket. Backups taken must be restored to the same version of Supermarket that was in use when they were created.

{{< /note >}}

Expand Down
5 changes: 1 addition & 4 deletions docs-chef-io/content/supermarket/supermarket_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ aliases = ["/supermarket_logs.html", "/supermarket_logs/"]
weight = 60
+++

The Chef Supermarket omnibus package does not log Ruby on Rails messages
by default. To enable debug logging, edit the
`/opt/supermarket/embedded/service/supermarket/config/environments/production.rb`
file and set the `config.log_level` setting to `:debug`:
The Chef Supermarket omnibus package does not log Ruby on Rails messages by default. To enable debug logging, edit the `/opt/supermarket/embedded/service/supermarket/config/environments/production.rb` file and set the `config.log_level` setting to `:debug`:

```ruby
config.logger = Logger.new('/var/log/supermarket/rails/rails.log')
Expand Down
3 changes: 1 addition & 2 deletions docs-chef-io/content/supermarket/supermarket_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ aliases = ["/supermarket_monitor.html", "/supermarket_monitor/"]
weight = 50
+++

A private Chef Supermarket includes a URL for status monitoring:
<https://your_private_supermarket/status>.
A private Chef Supermarket includes a URL for status monitoring, which has the format: `https://your_private_supermarket/status`.
Loading