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

fix: update docs for linux install #159

Merged
merged 1 commit into from
Feb 22, 2024
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
10 changes: 6 additions & 4 deletions docs/install-guides/install-guide-k8s.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Installing zot with Kubernetes and Helm

> :point_right: Using Kubernetes with Helm charts for zot, you can easily deploy zot as an application in a Kubernetes cluster.
> :point_right: Using Kubernetes with Helm charts for zot, you can easily deploy
> zot as an application in a Kubernetes cluster.

## Before you begin

### Prerequisites

- kubectl must be installed and a Kubernetes cluster must be ready.
- kubectl must be installed and a Kubernetes cluster must be ready.

- [Helm](https://helm.sh/) must be installed.
- [Helm](https://helm.sh/) must be installed.

### Supported platforms

Expand Down Expand Up @@ -359,7 +360,8 @@ below:

The zot configuration file is located at `/etc/zot/config.json`.

Refer to [*Configuring zot*](../admin-guide/admin-configuration.md) for complete information on configuring the zot server with the zot configuration file.
Refer to [*Configuring zot*](../admin-guide/admin-configuration.md) for complete
information on configuring the zot server with the zot configuration file.

### Uninstalling zot

Expand Down
42 changes: 29 additions & 13 deletions docs/install-guides/install-guide-linux.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Installing zot on Bare Metal Linux

> :point_right: Using an available executable zot image, you can easily deploy zot on a Linux server.
> :point_right: Using an available executable zot image, you can easily deploy
> zot on a Linux server.

## Before you begin

Expand All @@ -18,12 +19,16 @@ image variations, image locations, and image naming formats.
### Step 1: Get zot

Using `wget,` download the appropriate zot binary image for your
platform from the [zot GitHub
project](https://github.com/project-zot/zot). Download the
image to the\`/usr/bin/\` directory and rename it to `zot,` as in this
platform from the [zot GitHub project](https://github.com/project-zot/zot).
Download the image to the\`/usr/bin/\` directory and rename it to `zot,` as in this
example:

wget -O /usr/bin/zot https://github.com/project-zot/zot/releases/download/{{ git.tag }}/zot-linux-amd64
sudo wget -O /usr/bin/zot https://github.com/project-zot/zot/releases/download/{{ git.tag }}/zot-linux-amd64

Then fix permissions to it:

sudo chmod +x /usr/bin/zot
sudo chown root:root /usr/bin/zot

### Step 2: Create a zot configuration file

Expand All @@ -48,7 +53,8 @@ To add additional local users, use the `>>` redirect as in this example:

### Step 4: Define the zot service

Create a `/etc/systemd/system/zot.service` file to define the zot service in systemd. The following is an example service file for zot:
Create a `/etc/systemd/system/zot.service` file to define the zot service in systemd.
The following is an example service file for zot:

[Unit]
Description=OCI Distribution Registry
Expand All @@ -69,7 +75,9 @@ Create a `/etc/systemd/system/zot.service` file to define the zot service in sys
WantedBy=multi-user.target

> :pencil2:
> Be sure to configure a dedicated non-root user ID as the User and Group in the zot service definition. The 'zot' user ID in this example is created in the next step.
> Be sure to configure a dedicated non-root user ID as the User and Group in
> the zot service definition. The 'zot' user ID in this example is created in
> the next step.


### Step 5: Create a user ID to own the zot service
Expand All @@ -86,20 +94,27 @@ In this example, the user ID 'zot' is created with the `adduser` command, and re
sudo mkdir -p /var/log/zot
sudo chown -R zot:zot /var/log/zot

sudo chown root:root /usr/bin/zot
sudo chown root:root config.json
sudo chown -R root:root /etc/zot/

With the `adduser` options shown, the 'zot' user ID has no local
directory. There is no ability to log into the zot user account, and the
account has no finger information.

### Step 6: Start zot

Reload systemd config:

sudo systemctl daemon-reload

Enable and start the zot service with these commands:

sudo systemctl enable zot
sudo systemctl start zot

Check if zot config is valid:

sudo -u zot zot verify /etc/zot/config.json

When the zot service has started, you can check its status with this
command:

Expand All @@ -108,10 +123,10 @@ command:
## After the installation

If your zot registry server is public facing, we recommend that you test
your TLS configuration using a service such as the [Qualys SSL Server
Test](https://www.ssllabs.com/ssltest/).
your TLS configuration using a service such as the [Qualys SSL Server Test](https://www.ssllabs.com/ssltest/).

Refer to [*Configuring zot*](../admin-guide/admin-configuration.md) for further information about maintaining your zot registry server.
Refer to [*Configuring zot*](../admin-guide/admin-configuration.md) for further
information about maintaining your zot registry server.

<a name="config-file-options"></a>

Expand Down Expand Up @@ -188,7 +203,8 @@ your own environment.

</details>

Refer to [*Configuring zot*](../admin-guide/admin-configuration.md) for more details about configuration file options.
Refer to [*Configuring zot*](../admin-guide/admin-configuration.md) for more
details about configuration file options.

### TLS encryption

Expand Down
Loading