Skip to content

Commit

Permalink
Merge pull request #208 from lxc-jp/update-2021-11-05
Browse files Browse the repository at this point in the history
Update Update translations of LXD 4.20 (Closes #207)
  • Loading branch information
tenforward authored Nov 7, 2021
2 parents 903437e + d0271e7 commit 865d426
Show file tree
Hide file tree
Showing 13 changed files with 1,243 additions and 148 deletions.
71 changes: 71 additions & 0 deletions doc/api-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2753,3 +2753,74 @@ This includes the following endpoints:
-->

* `GET /1.0/metrics`

## image\_source\_project
`POST /1.0/images``project` フィールドを追加し、イメージコピー時にコピー元プロジェクトを設定できるようにします。
<!--
Adds a new `project` field to `POST /1.0/images` allowing for the source project
to be set at image copy time.
-->

## clustering\_config
クラスターメンバーに `config` プロパティーを追加し、キー・バリュー・ペアを設定可能にします。
<!--
Adds new `config` property to cluster members with configurable key/value pairs.
-->

## network\_peer
ネットワークピアリングを追加し、 OVN ネットワーク間のトラフィックが OVN サブシステムの外に出ずに通信できるようにします。
<!--
This adds network peering to allow traffic to flow between OVN networks without leaving the OVN subsystem.
-->

## linux\_sysctl
`linux.sysctl.*` 設定キーを追加し、ユーザーが一コンテナー内の一部のカーネルパラメータを変更できるようにします。
<!--
Adds new `linux.sysctl.*` configuration keys allowing users to modify certain kernel parameters
within containers.
-->

## network\_dns
組み込みの DNS サーバーとゾーン API を追加し、 LXD インスタンスに DNS レコードを提供します。
<!--
Introduces a built-in DNS server and zones API to provide DNS records for LXD instances.
-->

以下のサーバー設定キーが追加されます。
<!--
This introduces the following server configuration key:
-->

- `core.dns_address`

以下のネットワーク設定キーが追加されます。
<!--
The following network configuration key:
-->

- `dns.zone.forward`
- `dns.zone.reverse.ipv4`
- `dns.zone.reverse.ipv6`

以下のプロジェクト設定キーが追加されます。
<!--
And the following project configuration key:
-->

- `restricted.networks.zones`

DNS ゾーンを管理するために下記の REST API が追加されます。
<!--
A new REST API is also introduced to manage DNS zones:
-->

- `/1.0/network-zones` (GET, POST)
- `/1.0/network-zones/<name>` (GET, PUT, PATCH, DELETE)

## ovn\_nic\_acceleration
OVN NIC に `acceleration` 設定キーを追加し、ハードウェアオフロードを有効にするのに使用できます。
設定値は `none` または `sriov` です。
<!--
Adds new `acceleration` config key to OVN NICs which can be used for enabling hardware offloading.
It takes the values `none` or `sriov`.
-->
20 changes: 20 additions & 0 deletions doc/clustering.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,26 @@ an individual node is available with `lxc cluster show <node name>`.
-->
クラスターが形成されると、`lxc cluster list` を実行して、ノードのリストと状態を見ることができます。ノードそれぞれのもっと詳細な情報は `lxc cluster show <node name>` を実行して取得できます。

### クラスターメンバーの設定 <!-- Cluster member configuration -->

各クラスターメンバーは以下のサポートされるネームスペース内で独自のキー・バリュー設定を持てます。
<!--
Each cluster member has its own key/value configuration with the following supported namespaces:
-->

- `user` (ユーザーのメタデータ用に自由形式のキー・バリュー) <!-- (free form key/value for user metadata) -->
- `scheduler` (メンバーが自クラスターによりどのように動的にターゲットされるかに関連するオプション) <!-- (options related to how the member is automatically targeted by the cluster) -->

現状サポートされるキーは以下の通りです。
<!--
The currently supported keys are:
-->

| キー <!-- Key --> | 型 <!-- Type --> | 条件 <!-- Condition --> | デフォルト値 <!-- Default --> | 説明 <!-- Description --> |
| :----------------- | :----- | :-------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| scheduler.instance | string | - | all | `all` の場合、最低数のインスタンスを持っていれば、`all` と設定されたインスタンスの中から1つインスタンス作成時に自動的に選択されてターゲットされます。 `manual` の場合、インスタンスは `--target` が指定されたときのみメンバーにターゲットされます。 <!-- If `all` then the member will be auto-targeted for instance creation if it has the least number of instances. If `manual` then instances will only target the member if `--target` is given. --> |
| user.\* | string | - | - | 自由形式のユーザーのキー・バリュー・ストレージ (検索で使用可能) <!-- Free form user key/value storage (can be used in search) --> |

### 投票 (voting) メンバーとスタンバイメンバー <!-- Voting and stand-by members -->

クラスターは状態を保管するために分散 [データベース](database.md) を使用します。
Expand Down
1 change: 1 addition & 0 deletions doc/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ the user's environment and to turn some advanced features on and off.
`LXD_UNPRIVILEGED_ONLY` | `true` に設定すると非特権コンテナーしか作れなくなるように強制します。 LXD_UNPRIVILEGED_ONLY を設定する前に作られた特権コンテナーだけが引き続き特権を持つことに注意してください。このオプションを LXD デーモンを最初にセットアップするときに設定するのが実用的です。 <!-- If set to `true`, enforces that only unprivileged containers can be created. Note that any privileged containers that have been created before setting LXD_UNPRIVILEGED_ONLY will continue to be privileged. To use this option effectively it should be set when the LXD daemon is first setup. -->
`LXD_OVMF_PATH` | `OVMF_CODE.fd``OVMF_VARS.ms.fd` を含む OVMF ビルドへのパス <!-- Path to an OVMF build including `OVMF_CODE.fd` and `OVMF_VARS.ms.fd` -->
`LXD_SHIFTFS_DISABLE` | shiftfs のサポートを無効にする(従来の UID シフトを試す際に有用です) <!-- Disable shiftfs support (useful when testing traditional UID shifting) -->
`LXD_DEVMONITOR_DIR` | デバイスモニターでモニターするパス。主にテスト用。 <!-- Path to be monitored by the device monitor. This is primarily for testing. -->
14 changes: 1 addition & 13 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,6 @@ sudo apt update
sudo apt install acl attr autoconf dnsmasq-base git golang libacl1-dev libcap-dev liblxc1 liblxc-dev libsqlite3-dev libtool libudev-dev liblz4-dev libuv1-dev make pkg-config rsync squashfs-tools tar tcl xz-utils ebtables
```

<!--
Note that when building LXC yourself, ensure to build it with the appropriate
security related libraries installed which our testsuite tests. Again, on
ubuntu, you can get those with:
-->
LXC を自分でビルドする場合は、テストスイートがテストする、関連する適切なセキュリティ関連のライブラリーがインストールされていることを確認してください。
Ubuntu であれば次のようにインストールできます:

```bash
sudo apt install libapparmor-dev libseccomp-dev libcap-dev
```

<!--
There are a few storage backends for LXD besides the default "directory" backend.
Installing these tools adds a bit to initramfs and may slow down your
Expand All @@ -102,7 +90,7 @@ To run the testsuite, you'll also need:
テストスイートを実行するには、次のパッケージも必要です:

```bash
sudo apt install curl gettext jq sqlite3 uuid-runtime socat
sudo apt install curl gettext jq sqlite3 uuid-runtime socat bind9-dnsutils
```

### ソースからの最新版のビルド <!-- From Source: Building the latest version -->
Expand Down
121 changes: 120 additions & 1 deletion doc/instances.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ limits.memory.swap.priority | integer | 10 (maximum) | ye
limits.network.priority | integer | 0 (minimum) | yes | - | 負荷がかかった状態で、インスタンスのネットワークリクエストに割り当てる優先度(0 〜 10 の整数) <!-- When under load, how much priority to give to the instance's network requests (integer between 0 and 10) -->
limits.processes | integer | - (max) | yes | container | インスタンス内で実行できるプロセスの最大数 <!-- Maximum number of processes that can run in the instance -->
linux.kernel\_modules | string | - | yes | container | インスタンスを起動する前にロードするカーネルモジュールのカンマ区切りのリスト <!--Comma separated list of kernel modules to load before starting the instance -->
linux.sysctl.\* | string | - | no | container | sysctl 設定の変更に使用可能 <!-- Allow for modify sysctl settings -->
migration.incremental.memory | boolean | false | yes | container | インスタンスのダウンタイムを短くするためにインスタンスのメモリを増分転送するかどうか <!--Incremental memory transfer of the instance's memory to reduce downtime -->
migration.incremental.memory.goal | integer | 70 | yes | container | インスタンスを停止させる前に同期するメモリの割合 <!-- Percentage of memory to have in sync before stopping the instance -->
migration.incremental.memory.iterations | integer | 10 | yes | container | インスタンスを停止させる前に完了させるメモリ転送処理の最大数 <!-- Maximum number of transfer operations to go through before stopping the instance -->
Expand Down Expand Up @@ -249,6 +250,66 @@ scheduler priority score when a number of instances sharing a set of
CPUs have the same percentage of CPU assigned to them.
-->

### VM CPU トポロジー <!-- VM CPU topology -->
LXD の仮想マシンはデフォルトでは vCPU を 1 つだけ割り当てて、それは
ホストの CPU のベンダーとタイプにマッチしたものとして表示されますが
シングルコアでスレッドはありません。
<!--
LXD virtual machines default to having just one vCPU allocated which
shows up as matching the host CPU vendor and type but has a single core
and no threads.
-->

`limits.cpu` を単一の整数に設定すると、複数の vCPU が割り当てられゲストにフルのコアとして公開します。
これらの vCPU ホスト上の特定の物理コアにピン止めはされません。
<!--
When `limits.cpu` is set to a single integer, this will cause multiple
vCPUs to be allocated and exposed to the guest as full cores. Those vCPUs
will not be pinned to specific physical cores on the host.
-->

`limits.cpu` に CPU ID (`lxc info --resources` で表示されます) の範囲やカンマ区切りリストを指定すると、 vCPU はそれらの物理コアにピン止めされます。
このシナリオでは LXD は CPU 設定が実際のハードウェアトポロジーと合っているか確認し、合っている場合はゲストのトポロジーに複製します。
<!--
When `limits.cpu` is set to a range or comma separate list of CPU IDs
(as provided by `lxc info -\-resources`), then the vCPUs will be pinned
to those physical cores. In this scenario, LXD will check whether the
CPU configuration lines up with a realistic hardware topology and if it
does, it will replicate that topology in the guest.
-->

例えばピン止めの設定が 8 スレッドを含む場合、スレッドの各ペアは同じコアから提供され、
コア番号が 2 つの CPU にまたがる場合でも、 LXD はゲストに 2 つの CPU を提供し、
各 CPU は 2 つのコアを持ち、各コアは 2 つのスレッドを持ちます。
NUMA レイアウトも同様に複製され、このシナリオではゲストは十中八九
各 CPU ソケットにつき 1 つ、合計 2 つの NUMA ノードを持つことになるでしょう。
<!--
This means that if the pinning configuration includes 8 threads, with
each pair of thread coming from the same core and an even number of
cores spread across two CPUs, LXD will have the guest show two CPUs,
each with two cores and each core with two threads. The NUMA layout is
similarly replicated and in this scenario, the guest would most likely
end up with two NUMA nodes, one for each CPU socket.
-->

複数の NUMA ノードの環境では、メモリも同様に NUMA ノードに分割され、
それに応じてホストでピン止めされ、その後ゲストにも公開します。
<!--
In such an environment with multiple NUMA nodes, the memory will
similarly be divided across NUMA nodes and be pinned accordingly on the
host and then exposed to the guest.
-->

これら全てによりゲスト内で非常に高いパフォーマンスのオペレーションが可能です。
これはゲストのスケジューラーが NUMA ノード間でメモリを共有したりプロセスを移動する際に
ソケット、コア、スレッドについて適切に判断し、 NUMA トポロジーも考慮できるからです。
<!--
All this allows for very high performance operations in the guest as the
guest scheduler can properly reason about sockets, cores and threads as
well as consider NUMA topology when sharing memory or moving processes
across NUMA nodes.
-->

# デバイス設定 <!-- Devices configuration -->
LXD は、標準の POSIX システムが動作するのに必要な基本的なデバイスを常にインスタンスに提供します。これらはインスタンスやプロファイルの設定では見えず、上書きもできません。
<!--
Expand Down Expand Up @@ -570,6 +631,7 @@ Device configuration properties:
Key | Type | Default | Required | Managed | Description
:-- | :-- | :-- | :-- | :-- | :--
network | string | - | yes | yes | デバイスの接続先の LXD ネットワーク <!-- The LXD network to link device to -->
acceleration | string | none | no | no | ハードウェアオフローディングを有効にする。 `none``sriov` (下記の SR-IOV ハードウェアアクセラレーション参照) <!-- Enable hardware offloading. Either `none` or `sriov` (see SR-IOV hardware acceleration below) -->
name | string | カーネルが割り当て <!-- kernel assigned --> | no | no | インスタンス内部でのインタフェース名 <!-- The name of the interface inside the instance -->
host\_name | string | ランダムに割り当て <!-- randomly assigned --> | no | no | ホスト内部でのインタフェース名 <!-- The name of the interface inside the host -->
hwaddr | string | ランダムに割り当て <!-- randomly assigned --> | no | no | 新しいインターフェースの MAC アドレス <!-- The MAC address of the new interface -->
Expand All @@ -586,6 +648,63 @@ security.acls.default.egress.action | string | reject
security.acls.default.ingress.logged | boolean | false | no | no | どの ACL ルールにもマッチしない ingress トラフィックをログ出力するかどうか <!-- Whether to log ingress traffic that doesn't match any ACL rule -->
security.acls.default.egress.logged | boolean | false | no | no | どの ACL ルールにもマッチしない egress トラフィックをログ出力するかどうか <!-- Whether to log egress traffic that doesn't match any ACL rule -->

SR-IOV ハードウェアアクセラレーション:
<!--
SR-IOV hardware acceleration:
-->

`acceleration=sriov` を使用するためには互換性のある SR-IOV switchdev が使用できる物理 NIC が LXD ホスト内に存在する必要があります。
LXD は、物理 NIC (PF) が switchdev モードに設定されて OVN の統合 OVN ブリッジに接続されており、1 つ以上の仮想ファンクション (VF) がアクティブであることを想定しています。
<!--
In order to use `acceleration=sriov` you need to have a compatible SR-IOV switchdev capable phyical NIC in your LXD
host. LXD assumes that the physical NIC (PF) will be configured in switchdev mode and will be connected to the OVN
integration OVS bridge and that it will have one or more virtual functions (VFs) active.
-->

これを実現するための前提となるセットアップの行程は以下の通りです。
<!--
The basic prerequisite setup steps to achieve this are:
-->

PF と VF のセットアップ:
<!--
PF and VF setup:
-->

PF 上(以下の例では `0000:09:00.0` の PCI アドレスで `enp9s0f0np0` という名前) の VF をアクティベートしアンバインドします。
次に `switchdev` モードと PF 上の `hw-tc-offload` を有効にします。
最後に VF をリバインドします。
<!--
Activate some VFs on PF (in this case called `enp9s0f0np0` with a PCI address of `0000:09:00.0`) and unbind them.
Then enable `switchdev` mode and `hw-tc-offload` on the the PF.
Finally rebind the VFs.
-->

```
echo 4 > /sys/bus/pci/devices/0000:09:00.0/sriov_numvfs
for i in $(lspci -nnn | grep "Virtual Function" | cut -d' ' -f1); do echo 0000:$i > /sys/bus/pci/drivers/mlx5_core/unbind; done
devlink dev eswitch set pci/0000:09:00.0 mode switchdev
ethtool -K enp9s0f0np0 hw-tc-offload on
for i in $(lspci -nnn | grep "Virtual Function" | cut -d' ' -f1); do echo 0000:$i > /sys/bus/pci/drivers/mlx5_core/bind; done
```

OVS のセットアップ:
<!--
OVS setup:
-->

ハードウェアオフロードを有効にし、 PF NIC を統合ブリッジ (通常は `br-int` という名前) に追加します。
<!--
Enable hardware offload and add the PF NIC to the integration bridge (normally callled `br-int`):
-->

```
ovs-vsctl set open_vswitch . other_config:hw-offload=true
systemctl restart openvswitch-switch
ovs-vsctl add-port br-int enp9s0f0np0
ip link set enp9s0f0np0 up
```

#### nic: physical

サポートされるインスタンスタイプ: コンテナー, VM
Expand Down Expand Up @@ -1540,7 +1659,7 @@ On the command line, this is passed like this:
-->

```bash
lxc launch ubuntu:18.04 my-instance -t t2.micro
lxc launch ubuntu:20.04 my-instance -t t2.micro
```

使えるクラウドとインスタンスタイプのリストは次をご覧ください:
Expand Down
Loading

0 comments on commit 865d426

Please sign in to comment.