Skip to content
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
39 changes: 22 additions & 17 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "docs.technotut.net",
"name": "noc.technotut.net",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "ghcr.io/technotut/docs.technotut.net:main",

"image": "docker.io/node:22.14",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-ceintl.vscode-language-pack-ja",
"github.vscode-github-actions",
"github.github-vscode-theme",
"github.vscode-pull-request-github",
"ms-vscode.vscode-typescript-next",
"eamodio.gitlens",
"hediet.vscode-drawio"
],
"settings": {
"workbench.colorTheme": "GitHub Dark Default"
"extensions": [
"ms-ceintl.vscode-language-pack-ja",
"github.vscode-github-actions",
"github.github-vscode-theme",
"github.vscode-pull-request-github",
"ms-vscode.vscode-typescript-next",
"eamodio.gitlens",
"hediet.vscode-drawio"
],
"settings": {
"workbench.colorTheme": "GitHub Dark Default"
}
}
}
},
// If you are using podman, enable this setting.
// "runArgs": ["--security-opt", "label=disable"],
// "runArgs": [
// "--security-opt",
// "label=disable"
// ],
// "remoteUser": "",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000]
"postCreateCommand": "cd docs && npm install",
"forwardPorts": [
3000
]
}
7 changes: 2 additions & 5 deletions .github/workflows/pages-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@ jobs:
- name: Build
run: npm run build
- name: Publish
uses: cloudflare/pages-action@1
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: technotut-infra
directory: ./docs/build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: '3'
command: pages deploy docs/build --project-name=technotut-infra
7 changes: 7 additions & 0 deletions docs/docs/computing/build/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: 構築
sidebar_position: 2
---
# Build
- [仮想基盤](/computing/build/pve)
- [コンテナ実行基盤](/computing/build/k3s)
101 changes: 38 additions & 63 deletions docs/docs/server/index.md → docs/docs/computing/build/k3s.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,30 @@
---
title: Server
slug: /server
title: コンテナ実行環境
sidebar_position: 2
---
[TechnoTUT Network](/) 網内でサーバを運用しています。
## 使用方法
使用方法については、以下のページを参照してください。
- [仮想基盤](/service/virtualization)
- [コンテナ実行環境](/service/kubernetes)

## 構築
### 仮想基盤
[Proxmox VE](https://www.proxmox.com/proxmox-ve) を使用して、仮想基盤を構築します。DVDまたはUSBメモリからインストールします。
インストール後、Webブラウザからアクセスし、設定を行います。
https://192.168.99.99:8006/

#### ネットワーク
サーバは、L3スイッチにトランク接続されています。
サーバ内の仮想マシン・コンテナは、任意のVLANに所属させることができます。
```mermaid
graph TD
C[L3 Switch]-->|tagged| D[Server #1]
C -->|tagged| E[Server #2]
```
サーバをトランク接続する際は、以下の手順で`openvswitch`を設定します。
```bash
apt update
apt install openvswitch-switch
```

Web UIの [対象ノード] > システム > ネットワーク を開きます。
| 名前 | 種別 | ブリッジポート | VLAN ID |
| --- | --- | --- | --- |
| [NIC] | OVS Port | vmbr0 | - |
| vmbr0 | OVS Bridge | [NIC] [vlan99] | - |
| vlan99 | OVS IntPort | vmbr0 | 99 |

#### リポジトリ
Web UIの [対象ノード] > アップデート > リポジトリ を開きます。
`enterprise` と `pve-enterprise` を削除し、`no-subscription` を追加します。

### コンテナ実行環境
# Kubernetes
[k3s](https://k3s.io/) を使用して、コンテナ実行環境を構築します。
#### 仮想マシンの作成
任意のLinuxディストリビューションで仮想マシンを作成します。
k3s は軽量なKubernetesのディストリビューションであり、IoTやエッジコンピューティングなどのリソースが限られた環境に適しています。
## OSのインストール
任意のLinuxディストリビューションをインストールします。
ネットワークは、`vlan99`に接続し、IPアドレスを`192.168.99.33`に設定します。
#### インストール
## インストール
Podネットワークは、`10.244.0.0/16`に設定します。
ネットワークプラグインは`calico` を使用し、ルータとBGPで接続します。
ネットワークプラグインは`calico` を使用し、ルータとBGPで接続します。BGPで経路情報を交換することで、KubernetesのPodネットワークとルータのネットワークを接続します。
```bash
sudo su -
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" INSTALL_K3S_EXEC="--flannel-backend=none --cluster-cidr=10.244.0.0/16 --disable-network-policy --disable=traefik" sh -
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" INSTALL_K3S_EXEC="--flannel-backend=none --cluster-cidr=10.244.0.0/16 --disable-network-policy --disable=traefik --disable=servicelb" sh -
```
#### ネットワーク
Calicoをインストールします。
## ネットワーク
Kubernetesのネットワークプラグインとして、Calicoをインストールします。
```bash
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.4/manifests/tigera-operator.yaml
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.1/manifests/tigera-operator.yaml
kubectl create -f https://raw.githubusercontent.com/technotut/k3s/main/setup/calico-manifest/custom-resources.yaml
```
Calicoctlのインストールし、設定を行います。
calicoctlインストールし、設定を行います。
```bash
cd /usr/local/bin
curl -L https://github.com/projectcalico/calico/releases/download/v3.26.4/calicoctl-linux-amd64 -o calicoctl
curl -L https://github.com/projectcalico/calico/releases/download/v3.28.1/calicoctl-linux-amd64 -o calicoctl
sudo chmod +x ./calicoctl
ln -s /etc/rancher/k3s/k3s.yaml ~/.kube/config
wget https://raw.githubusercontent.com/technotut/k3s/main/setup/calico-manifest/bgppeer.yaml
Expand All @@ -80,7 +43,7 @@ firewall-cmd --zone=trusted --add-source=10.244.0.0/16 --permanent
firewall-cmd --zone=trusted --add-source=<client-cidr> --permanent
firewall-cmd --reload
```
ルータの設定を行います。
ルータの設定を行います。ルータのAS番号は`65000`、Kubernetes側のAS番号も`65000`とし、iBGPで接続します。
```terminal
router bgp 65000
neighbor 192.168.99.33 remote-as 65000
Expand All @@ -94,6 +57,10 @@ router bgp 65000
writ memory
```
BGPの設定が適切であるか、経路交換が行われているか確認します。
```terminal
show ip bgp summary
```
"ESTABLISHED"と表示されていれば、BGPの接続が成功しています。ノード側の設定が正しく行われているかも確認します。
```bash
calicoctl get nodes -o wide
calicoctl get bgpPeer -o wide
Expand All @@ -102,9 +69,11 @@ calicoctl get bgpConfiguration -o wide
watch kubectl get pod -A -o wide
ip route
```
#### ボリューム
KubernetesにおけるPersistentVolumeの設定を行います。
KubernetesはマニフェストのPersistentVolumeClainに応じて、自動で永続ボリュームを割当てます。
## ボリューム
Kubernetesのボリュームとして、NFSを使用します。
KubernetesはマニフェストのPersistentVolumeClaimに応じて、自動で永続ボリュームを割当てます。

まずはNFSサーバを構築します。
```bash
mkdir /nfs
dnf install nfs-utils
Expand All @@ -115,7 +84,7 @@ exportfs
firewall-cmd --add-service=nfs --permanent
firewall-cmd --reload
```
Helmをインストールします
KubernetesのパッケージマネージャーであるHelmをインストールします
```bash
cd /usr/local/bin
wget https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz
Expand All @@ -129,22 +98,28 @@ Helmを使って、[nfs-subdir-external-provisioner](https://github.com/kubernet
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner --set nfs.server=localhost --set nfs.path=/nfs
```
#### Kompose
Docker ComposeのマニフェストをKubernetesのマニフェストに変換するツールです
#### MetalLB
MetalLBは、Kubernetesのロードバランサーです。インストールすることで、KubernetesのServiceに対して、外部からアクセスできるようになります
```bash
cd /usr/local/bin
curl -L https://github.com/kubernetes/kompose/releases/download/v1.31.2/kompose-linux-amd64 -o kompose
chmod +x kompose
kubectl apply -f https://raw.githubusercontent.com/technotut/k3s/main/setup/metallb/metallb.yaml
kubectl apply -f https://raw.githubusercontent.com/technotut/k3s/main/setup/metallb/metallb-ipaddresspool.yaml
```
#### ingress-nginx
ingress-nginxは、KubernetesのIngressコントローラです。インストールすることで、KubernetesのIngressリソースを利用して、HTTP/HTTPSのトラフィックをルーティングできます。
```bash
helm upgrade --install ingress-nginx ingress-nginx \
--repo https://kubernetes.github.io/ingress-nginx \
--namespace ingress-nginx --create-namespace
```
#### ArgoCD
ArgoCDは、KubernetesのCDツールです。
ArgoCDは、KubernetesのCDツールです。GitHubのリポジトリに保存されたマニフェストを監視し、変更があれば自動でデプロイします。
```bash
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/technotut/k3s/main/setup/argocd/install.yaml
cd /usr/local/bin
curl -L https://github.com/argoproj/argo-cd/releases/download/v2.9.2/argocd-linux-amd64 -o argocd
curl -L https://github.com/argoproj/argo-cd/releases/download/v2.11.8/argocd-linux-amd64 -o argocd
chmod +x argocd
firewall-cmd --add-port=30001/tcp --permanent
firewall-cmd --reload
```
ArgoCDのWeb UIは、`https://192.168.99.33:30001`から開くことができます
ArgoCDのWeb UIは、`https://argocd.kube.technotut,net` でアクセスできます
28 changes: 28 additions & 0 deletions docs/docs/computing/build/pve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: 仮想基盤
sidebar_position: 1
---
# Virtual Environment
[Proxmox VE](https://www.proxmox.com/proxmox-ve) を使用して、仮想基盤を構築します。DVDまたはUSBメモリからインストールします。
インストール後、Webブラウザからアクセスし、設定を行います。
https://192.168.99.99:8006/

#### ネットワーク
サーバは、L3スイッチにトランク接続されています。
サーバ内の仮想マシン・コンテナは、任意のVLANに所属させることができます。
サーバをトランク接続する際は、以下の手順で`openvswitch`を設定します。
```bash
apt update
apt install openvswitch-switch
```

Web UIの [対象ノード] > システム > ネットワーク を開きます。
| 名前 | 種別 | ブリッジポート | VLAN ID |
| --- | --- | --- | --- |
| [NIC] | OVS Port | vmbr0 | - |
| vmbr0 | OVS Bridge | [NIC] [vlan99] | - |
| vlan99 | OVS IntPort | vmbr0 | 99 |

#### リポジトリ
Web UIの [対象ノード] > アップデート > リポジトリ を開きます。
`enterprise` と `pve-enterprise` を削除し、`no-subscription` を追加します。
25 changes: 25 additions & 0 deletions docs/docs/computing/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: 概要
slug: /computing
sidebar_position: 1
---
# About
[TechnoTUT Network](/) では、計算機を運用し、計算資源を提供しています。
運用中の計算機は仮想化技術を活用し、ソフトウェアとハードウェアの間に抽象化レイヤーを設けることで効率的に利用できるようにしています。
TechnoTUT Network では、ハイパーバイザー型とコンテナ型の2種類の仮想化手法を採用しています。

## ハイパーバイザー型
ハイパーバイザー型仮想化は、ハードウェア上にハイパーバイザーと呼ばれる仮想化ソフトウェアを配置し、その上で仮想マシンを実行する方式です。
TechnoTUT Network では、ハイパーバイザーとしてProxmox VE を採用し、KVMによる仮想マシンとLXCによるコンテナを提供しています。

## コンテナ型
コンテナ型仮想化は、Linux カーネルの機能を利用してプロセスを隔離する方式です。Linux カーネルを共有することで、仮想マシンよりも軽量で高速に動作します。
TechnoTUT Network では、Kubernetes をコンテナオーケストレーションツールとして採用しています。Kubernetes により、Infrastructure as Code (IaC) による運用が可能であり、運用の効率化を実現します。

## How to use
使用方法については、以下のページを参照してください。
- [仮想基盤](/service/virtualization)
- [コンテナ実行環境](/service/kubernetes)

## Build
構築方法については、[構築](/computing/build) を参照してください。
62 changes: 62 additions & 0 deletions docs/docs/network/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: 設計
sidebar_position: 2
---
## イベント運用時
![物理構成図_イベント](https://raw.githubusercontent.com/TechnoTUT/Infrastructure/main/network/design/utone.drawio.svg)
![論理構成図_イベント](https://raw.githubusercontent.com/TechnoTUT/Infrastructure/main/network/design/utone.logic.drawio.svg)

### 経路制御
IX3110 - AT-x600-48Ts間でOSPFを、IX3110 - Kubernetesクラスタネットワーク間でBGPを使用して経路情報を交換しています。
L3機器間で経路情報を交換し、手動での経路設定を削減することで、運用負荷を軽減します。

### リンクアグリゲーション
コアスイッチであるAT-x600-48TsとDJブース、およびMOCとの間ではリンクアグリゲーションを構成しています。リンクアグリゲーションによって、LANケーブル切断時の冗長性を確保しながら帯域幅を拡張し、高速で安定したネットワークを提供します。

## 部室運用時
![物理構成図_部室](https://raw.githubusercontent.com/TechnoTUT/Infrastructure/main/network/design/clubroom.drawio.svg)
![論理構成図_部室](https://raw.githubusercontent.com/TechnoTUT/Infrastructure/main/network/design/clubroom.logic.drawio.svg)

### 静音性
部室運用時は、ファンレスで静音性の高いCisco 891FJ-K9をルーターとして使用します。ファンレス機器を採用することで、部室内のノイズを抑え、快適な環境を維持します。

### 互換性
イベント運用時と同様にVLANを分割することで、部室内でもイベントと同様の環境でテストを実施できる開発環境を提供します。

## イベント・部室共通
### VLAN
DJ(PRO DJ LINK)、VJ(NDI・Ableton Link)、照明制御(Art-Net)、撮影機材(RTMP)、PA(HTTP)、計算機クラスタ用に各機能ごとに仮想的にネットワークを分割しています。
各VLANは、イベント時はNEC IX3110とAllied Telesis AT-x600-48Ts、部室運用時はCisco 891FJ-K9でルーティングしています。各VLANの設定は以下の通りです。
#### VLAN10 (DJ, PRO DJ LINK)
CIDR: 10.10.0.0/16
DHCP: 10.10.254.0 - 10.10.254.254
Gateway: 10.10.0.1
DNS: 192.168.16.1
#### VLAN20 (VJ, NDI・Ableton Link)
CIDR: 10.20.0.0/16
DHCP: 10.20.254.0 - 10.20.254.254
Gateway: 10.20.0.1
DNS: 192.168.16.1
#### VLAN30 (Lightning, Art-Net)
CIDR: 192.168.11.0/24
DHCP: 無効
#### VLAN40 (Cam1, RTMP)
CIDR: 192.168.71.0/24
DHCP: 192.168.71.101 - 192.168.71.200
Gateway: 192.168.71.1
DNS: 10.33.71.11
#### VLAN50 (Cam2, RTMP)
CIDR: 192.168.72.0/24
DHCP: 192.168.72.101 - 192.168.72.200
Gateway: 192.168.72.1
DNS: 10.33.71.12
#### VLAN60 (PA)
CIDR: 192.168.60.0/24
DHCP: 192.168.60.101 - 192.168.60.200
Gateway: 192.168.60.1
DNS: 192.168.16.1
#### VLAN99 (Server)
CIDR: 192.168.99.0/24
DHCP: 192.168.99.101 - 192.168.99.200
Gateway: 192.168.99.1
DNS: 192.168.16.1
27 changes: 4 additions & 23 deletions docs/docs/network/dns.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
---
title: DNS
title: 名前解決
sidebar_position: 4
---
| IP | FQDN | Description |
|---|------|-------------|
| 192.168.8.1 | gw.intra.technotut.net | WAN |
| 192.168.16.1 | rt.intra.technotut.net | Router |
| 192.168.20.201 | vj1.intra.technotut.net | NDI-Client01 |
| 192.168.20.202 | vj2.intra.technotut.net | NDI-Client02 |
| 192.168.20.203 | vj3.intra.technotut.net | NDI-Client03 |
| 192.168.11.201 | led1.intra.technotut.net | LED-System01 |
| 192.168.11.202 | led2.intra.technotut.net | LED-System02 |
| 192.168.11.203 | led3.intra.technotut.net | LED-System03 |
| 192.168.11.204 | led4.intra.technotut.net | LED-System04 |
| 192.168.11.205 | led5.intra.technotut.net | LED-System05 |
| 192.168.11.206 | led6.intra.technotut.net | LED-System06 |
| 192.168.99.1 | sw3.intra.technotut.net | L3SW |
| 192.168.99.2 | sw2.intra.technotut.net | L2Switch #2 |
| 192.168.99.4 | sw4.intra.technotut.net | L2Switch #4 |
| 192.168.99.5 | sw5.intra.technotut.net | L2Switch #5 |
| 192.168.99.6 | sw6.intra.technotut.net | L2Switch #6 |
| 192.168.99.11 | blt.intra.technotut.net | LXC (Beat-Link-Trigger) |
| 192.168.99.21 | pj1.intra.technotut.net | Projector01 |
| 192.168.99.22 | pj2.intra.technotut.net | Projector02 |
| 192.168.99.33 | kube.intra.technotut.net | VM (Kubernetes) |
| 192.168.99.33 | kube.intra.technotut.net | Kubernetes |
| 192.168.99.51 | dns.intra.technotut.net | LXC (BIND) |
| 192.168.99.52 | np.intra.technotut.net | LXC (nginx) |
| 192.168.99.91 | netboot.intra.technotut.net | VM (LTSP, Diskless System) |
| 192.168.99.254 | ap.intra.technotut.net | Wi-Fi AP #1 |
| 192.168.99.254 | ap.intra.technotut.net | Wi-Fi AP |
Loading