Skip to content

Commit

Permalink
Proofreading and minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
kpumuk committed Sep 29, 2024
1 parent 3545c45 commit a53d0d2
Show file tree
Hide file tree
Showing 50 changed files with 226 additions and 220 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Development

```
```bash
bundle install
bundle exec jekyll serve --livereload
```
Expand Down
4 changes: 2 additions & 2 deletions docs/commands/accessory.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ They are not proxied, so rebooting will have a small period of downtime. You can

Run `kamal accessory` to view and manage your accessories.

```
```bash
$ kamal accessory
Commands:
kamal accessory boot [NAME] # Boot new accessory service on host (use NAME=all to boot all accessories)
Expand All @@ -29,7 +29,7 @@ To update an accessory, update the image in your config and run `kamal accessory

Example:

```
```bash
$ kamal accessory boot all
Running the pre-connect hook...
INFO [bd04b11b] Running /usr/bin/env .kamal/hooks/pre-connect on localhost
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To deploy new versions of the app, see `kamal deploy` and `kamal rollback`.

You can use `kamal app exec` to [run commands on servers](../running-commands-on-servers).

```
```bash
$ kamal app
Commands:
kamal app boot # Boot app on servers (or reboot app if already running)
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Audit

# kamal audit

Show the latest commands to have been run on each server.
Show the latest commands that have been run on each server.

```bash
$ kamal audit
Expand Down
4 changes: 2 additions & 2 deletions docs/commands/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Build

Build your app images and push them to your servers. These commands are called indirectly by `kamal deploy` and `kamal redeploy`.

By default, Kamal will only build files you have committed to your git repository. However, you can configure Kamal to use the current context (instead of a git archive of HEAD) by setting the [build context](https://kamal-deploy.org/docs/configuration/builders/#build-context).
By default, Kamal will only build files you have committed to your Git repository. However, you can configure Kamal to use the current context (instead of a Git archive of HEAD) by setting the [build context](https://kamal-deploy.org/docs/configuration/builders/#build-context).

```bash
$ kamal build
Expand All @@ -22,7 +22,7 @@ Commands:

Examples:

```
```bash
$ kamal build push
Running the pre-connect hook...
INFO [92ebc200] Running /usr/bin/env .kamal/hooks/pre-connect on localhost
Expand Down
13 changes: 7 additions & 6 deletions docs/commands/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ title: Deploy

# kamal deploy

Build and deploy your app to all servers. By default it will build the currently checked out version of the app.
Build and deploy your app to all servers. By default, it will build the currently checked out version of the app.

Kamal will use [kamal-proxy](https://github.com/basecamp/kamal-proxy) to seamlessly move requests from the old version of the app to new without downtime.
Kamal will use [kamal-proxy](https://github.com/basecamp/kamal-proxy) to seamlessly move requests from the old version of the app to the new one without downtime.

The deployment process is:
1. Login into the docker registry locally and on all servers
2. Build the app image, push it to the registry and pull it onto the servers

1. Log in to the Docker registry locally and on all servers.
2. Build the app image, push it to the registry, and pull it onto the servers.
3. Ensure kamal-proxy is running and accepting traffic on ports 80 and 443.
4. Start a new container with the version of the app that matches the current git version hash.
5. Tell kamal-proxy to route traffic to the new container once it is responding with `200 OK` to `GET /up`
4. Start a new container with the version of the app that matches the current Git version hash.
5. Tell kamal-proxy to route traffic to the new container once it is responding with `200 OK` to `GET /up`.
6. Stop the old container running the previous version of the app.
7. Prune unused images and stopped containers to ensure servers don't fill up.

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/details.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ df8990876d14 registry:4443/app:75bf6fa40b975cbd8aec05abf7164e0982f185ac "/do
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
14857a6cb6b1 registry:4443/busybox:1.36.0 "sh -c 'echo \"Starti…" 42 minutes ago Up 42 minutes custom-busybox
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
17f3ff88ff9f registry:4443/busybox:1.36.0 "sh -c 'echo \"Starti…" 42 minutes ago Up 42 minutes custom-busybox```
17f3ff88ff9f registry:4443/busybox:1.36.0 "sh -c 'echo \"Starti…" 42 minutes ago Up 42 minutes custom-busybox
```
2 changes: 1 addition & 1 deletion docs/commands/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Help

Displays help messages. Run `kamal help [command]` for details on a specific command.

```
```bash
$ kamal help
kamal accessory # Manage accessories (db/redis/search)
kamal app # Manage application
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Init

Creates the files needed to deploy your application with `kamal`.

```
```bash
$ kamal init
Created configuration file in config/deploy.yml
Created .kamal/secrets file
Expand Down
8 changes: 4 additions & 4 deletions docs/commands/lock.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Manage deployment locks.

Commands that are unsafe to run concurrently will take a lock while they run. The lock is an atomically created directory in the `.kamal` directory on the primary server.

You can manage them directly — for example clearing a leftover lock from a failed command or preventing deployments during a maintenance window.
You can manage them directly — for example, clearing a leftover lock from a failed command or preventing deployments during a maintenance window.

```
```bash
$ kamal lock
Commands:
kamal lock acquire -m, --message=MESSAGE # Acquire the deploy lock
Expand All @@ -26,7 +26,7 @@ $ kamal lock status
INFO [f085f083] Running /usr/bin/env mkdir -p .kamal on server1
INFO [f085f083] Finished in 0.146 seconds with exit status 0 (successful).
There is no deploy lock
$ kamal lock acquire -m "Maintanence in progress"
$ kamal lock acquire -m "Maintenance in progress"
INFO [d9f63437] Running /usr/bin/env mkdir -p .kamal on server1
INFO [d9f63437] Finished in 0.138 seconds with exit status 0 (successful).
Acquired the deploy lock
Expand All @@ -35,7 +35,7 @@ $ kamal lock status
INFO [9315755d] Finished in 0.130 seconds with exit status 0 (successful).
Locked by: Deployer at 2024-04-05T08:32:46Z
Version: 75bf6fa40b975cbd8aec05abf7164e0982f185ac
Message: Maintanence in progress
Message: Maintenance in progress
$ kamal lock release
INFO [7d5718a8] Running /usr/bin/env mkdir -p .kamal on server1
INFO [7d5718a8] Finished in 0.137 seconds with exit status 0 (successful).
Expand Down
12 changes: 6 additions & 6 deletions docs/commands/proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Kamal uses [kamal-proxy](https://github.com/basecamp/kamal-proxy) to proxy reque
$ kamal proxy
Commands:
kamal proxy boot # Boot proxy on servers
kamal proxy boot_config <set|get|reset> # Mange kamal-proxy boot configuration
kamal proxy boot_config <set|get|reset> # Manage kamal-proxy boot configuration
kamal proxy details # Show details about proxy container from servers
kamal proxy help [COMMAND] # Describe subcommands or one specific subcommand
kamal proxy logs # Show log lines from proxy on servers
Expand All @@ -29,9 +29,9 @@ You can also use [pre-proxy-reboot](../../hooks/pre-proxy-reboot) and [post-prox

## Boot configuration

You can manage boot configuration for kamal-proxy with `kamal proxy boot_config`
You can manage boot configuration for kamal-proxy with `kamal proxy boot_config`.

```
```bash
$ kamal proxy boot_config --help
Usage:
kamal proxy boot_config <set|get|clear>
Expand All @@ -46,8 +46,8 @@ Options:
[--docker-options=option=value option2=value2] # Docker options to pass to the proxy container
```

When set the config will be stored on the server the proxy runs on.
When set, the config will be stored on the server the proxy runs on.

If you are running more than one application on a single server, there is only one proxy and the boot config is shared, so you'll need to manage the it centrally.
If you are running more than one application on a single server, there is only one proxy, and the boot config is shared, so you'll need to manage it centrally.

The configuration will be loaded at boot time, when calling `kamal proxy boot` or `kamal proxy reboot`.
The configuration will be loaded at boot time when calling `kamal proxy boot` or `kamal proxy reboot`.
2 changes: 1 addition & 1 deletion docs/commands/prune.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Prune old containers and images.

Kamal keeps the last 5 deployed containers and the images they are using. Pruning deletes all older containers and images.

```
```bash
$ kamal help prune
Commands:
kamal prune all # Prune unused images and stopped containers
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Registry

# kamal registry

Log in and out of the docker registry on your servers.
Log in and out of the Docker registry on your servers.

Examples:

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: Remove

# kamal remove

This will remove app, kamal-proxy and accessory containers and log out of the docker registry.
This will remove the app, kamal-proxy, and accessory containers and log out of the Docker registry.

It will prompt for confirmation unless you add the `-y` option.
4 changes: 2 additions & 2 deletions docs/commands/rollback.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ badb1aa51db4 registry.digitalocean.com/user/app:6ef8a6a84c525b123c5245345a8483

From the example above, we can see that `e5d9d7c2b898289dfbc5f7f1334140d984eedae4` was the last version, so it's available as a rollback target. We can perform this rollback by running `kamal rollback e5d9d7c2b898289dfbc5f7f1334140d984eedae4`.

That'll stop `6ef8a6a84c525b123c5245345a8483f86d05a123` and then start a new container running the same image as `e5d9d7c2b898289dfbc5f7f1334140d984eedae4`. Nothing to download from the registry.
That'll stop `6ef8a6a84c525b123c5245345a8483f86d05a123` and then start a new container running the same image as `e5d9d7c2b898289dfbc5f7f1334140d984eedae4`. Nothing needs to be downloaded from the registry.

**Note:** By default old containers are pruned after 3 days when you run `kamal deploy`.
**Note:** By default, old containers are pruned after 3 days when you run `kamal deploy`.
20 changes: 10 additions & 10 deletions docs/commands/secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Commands:
kamal secrets help [COMMAND] # Describe subcommands or one specific subcommand
```

Use these to read secrets from common password managers (currently 1Password, LastPass and Bitwarden).
Use these to read secrets from common password managers (currently 1Password, LastPass, and Bitwarden).

The helpers will handle signing in, asking for passwords and efficiently fetching the secrets:
The helpers will handle signing in, asking for passwords, and efficiently fetching the secrets:

These are designed to be used with [command substitution](https://github.com/bkeepers/dotenv?tab=readme-ov-file#command-substitution) in `.kamal/secrets`

```
```shell
# .kamal/secrets

SECRETS=$(kamal secrets fetch ...)
Expand All @@ -29,9 +29,9 @@ DB_PASSWORD=$(kamal secrets extract DB_PASSWORD $SECRETS)

## 1Password

Use the adaptor `1password`:
Use the adapter `1password`:

```
```bash
# Fetch from item `MyItem` in the vault `MyVault`
kamal secrets fetch --adapter 1password --account myaccount --from MyVault/MyItem REGISTRY_PASSWORD DB_PASSWORD

Expand All @@ -42,7 +42,7 @@ kamal secrets fetch --adapter 1password --account myaccount --from MyVault/MyIte
kamal secrets fetch --adapter 1password --account myaccount --from MyVault MyItem/REGISTRY_PASSWORD MyItem2/DB_PASSWORD

# Fetch from multiple vaults
kamal secrets fetch --adapter 1password --account myaccount MyVault/MyItem/REGISTRY_PASSWORD MyVault2/MyItem2/DB_PASSWORD
kamal secrets fetch --adapter 1password --account myaccount MyVault/MyItem/REGISTRY_PASSWORD MyVault2/MyItem2/DB_PASSWORD

# All three of these will extract the secret
kamal secrets extract REGISTRY_PASSWORD <SECRETS-FETCH-OUTPUT>
Expand All @@ -52,9 +52,9 @@ kamal secrets extract MyVault/MyItem/REGISTRY_PASSWORD <SECRETS-FETCH-OUTPUT>

## LastPass

Use the adaptor `lastpass`:
Use the adapter `lastpass`:

```
```bash
# Fetch passwords
kamal secrets fetch --adapter lastpass --account [email protected] REGISTRY_PASSWORD DB_PASSWORD

Expand All @@ -71,9 +71,9 @@ kamal secrets extract MyFolder/REGISTRY_PASSWORD <SECRETS-FETCH-OUTPUT>

## Bitwarden

Use the adaptor `bitwarden`:
Use the adapter `bitwarden`:

```
```bash
# Fetch passwords
kamal secrets fetch --adapter bitwarden --account [email protected] REGISTRY_PASSWORD DB_PASSWORD

Expand Down
4 changes: 2 additions & 2 deletions docs/commands/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Commands:

## [Bootstrap server](#bootstrap-server)

You can run `kamal server bootstrap` to setup docker on your hosts.
You can run `kamal server bootstrap` to set up Docker on your hosts.

It will check if docker is installed and if not it will attempt to install it via [get.docker.com](https://get.docker.com/).
It will check if Docker is installed and, if not, it will attempt to install it via [get.docker.com](https://get.docker.com/).

```bash
$ kamal server bootstrap
Expand Down
7 changes: 4 additions & 3 deletions docs/commands/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ title: Setup
Kamal setup will run everything required to deploy an application to a fresh host.

It will:
1. Install docker on all servers, if it has permission and it is not already installed
2. Boot all accessories
3. Deploy the app (see [`kamal deploy`](../deploy))

1. Install Docker on all servers, if it has permission and it is not already installed.
2. Boot all accessories.
3. Deploy the app (see [`kamal deploy`](../deploy)).
2 changes: 1 addition & 1 deletion docs/commands/view-all-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: View all commands

You can view all of the commands by running `kamal --help`.

```
```bash
$ kamal --help
Commands:
kamal accessory # Manage accessories (db/redis/search)
Expand Down
16 changes: 8 additions & 8 deletions docs/configuration/accessories.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ title: Accessories

Accessories can be booted on a single host, a list of hosts, or on specific roles. The hosts do not need to be defined in the Kamal servers configuration.

Accessories are managed separately from the main service — they are not updated when you deploy and they do not have zero-downtime deployments.
Accessories are managed separately from the main service — they are not updated when you deploy, and they do not have zero-downtime deployments.

Run `kamal accessory boot <accessory>` to boot an accessory. See `kamal accessory --help` for more information.

## [Configuring accessories](#configuring-accessories)

First define the accessory in the `accessories`:
First, define the accessory in the `accessories`:

```yaml
accessories:
Expand All @@ -21,23 +21,23 @@ accessories:
## [Service name](#service-name)
This is used in the service label and defaults to `<service>-<accessory>` where `<service>` is the main service name from the root configuration:
This is used in the service label and defaults to `<service>-<accessory>`, where `<service>` is the main service name from the root configuration:

```yaml
service: mysql
```

## [Image](#image)

The Docker image to use, prefix with a registry if not using Docker hub:
The Docker image to use, prefix it with a registry if not using Docker Hub:

```yaml
image: mysql:8.0
```

## [Accessory hosts](#accessory-hosts)

Specify one of `host`, `hosts` or `roles`:
Specify one of `host`, `hosts`, or `roles`:

```yaml
host: mysql-db1
Expand All @@ -50,15 +50,15 @@ Specify one of `host`, `hosts` or `roles`:

## [Custom command](#custom-command)

You can set a custom command to run in the container, if you do not want to use the default:
You can set a custom command to run in the container if you do not want to use the default:

```yaml
cmd: "bin/mysqld"
```

## [Port mappings](#port-mappings)

See https://docs.docker.com/network/, especially note the warning about the security implications of exposing ports publicly.
See https://docs.docker.com/network/, and especially note the warning about the security implications of exposing ports publicly.

```yaml
port: "127.0.0.1:3306:3306"
Expand Down Expand Up @@ -92,7 +92,7 @@ See [Environment variables](../environment-variables) for more information:

## [Copying files](#copying-files)

You can specify files to mount into the container. The format is `local:remote` where `local` is the path to the file on the local machine and `remote` is the path to the file in the container.
You can specify files to mount into the container. The format is `local:remote`, where `local` is the path to the file on the local machine and `remote` is the path to the file in the container.

They will be uploaded from the local repo to the host and then mounted.

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ kamal console

Aliases are defined in the root config under the alias key.

Each alias is named and can only contain lowercase letters, numbers, dashes and underscores:
Each alias is named and can only contain lowercase letters, numbers, dashes, and underscores:

```yaml
aliases:
Expand Down
Loading

0 comments on commit a53d0d2

Please sign in to comment.