# Release v0.1.20 - Cassini Testnet

## **更新截止时间：**

请确保在<mark style="background-color:red;">**2024年8月5日 12:00 PM UTC（北京时间 20:00）**</mark>之前完成更新。否则节点将会被强制下线。

## 更新内容：

* Titan L1节点与容器集成
* <mark style="color:red;">**新增网络端口**</mark>
  * 80 TCP: 用于HTTP通信。<mark style="color:red;">**【新增】**</mark>
  * 443 TCP: 用于HTTPS通信。<mark style="color:red;">**【新增】**</mark>
  * 9000 TCP: 用于节点之间的通信。
  * 2345 TCP/UDP: 用于节点的广播和数据同步。

*确保这些端口在您的网络设置中已开放，以确保节点的正常运行和通信。*��

## **更新教程指南：**

### [全新节点，看这里](/titan-network-cn/3-ce-ka-xi-ni-ce-shi-wang/yun-xing-jie-dian/l1-guardian-jie-dian/l1-jie-dian-yun-xing-jiao-cheng.md)

### **老节点升级**

<details>

<summary><strong>前置步骤：安装 K3s</strong></summary>

### 1. 安装 K3s：

在您的终端中运行以下命令以安装K3s。此步骤将自动下载并安装K3s，同时禁用不必要的组件：

```bash
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--disable=traefik" sh -s -
```

### 2.配置 kubeconfig：

配置kubectl命令行工具的访问权限：

```
mkdir ~/.kube
sudo cat /etc/rancher/k3s/k3s.yaml | tee ~/.kube/config >/dev/null
```

### 3.验证K3s安装成功：

安装完成后，使用以下命令确认K3s已正确安装并运行：

```bash
kubectl get nodes
```

### 4.安装 Helm 工具：

Helm是管理Kubernetes应用的工具。通过以下命令安装Helm：

```bash
wget https://get.helm.sh/helm-v3.11.0-linux-amd64.tar.gz
tar -zxvf helm-v3.11.0-linux-amd64.tar.gz
install linux-amd64/helm /usr/local/bin/helm
```

### 5.安装 Ingress Nginx：

通过Helm安装Ingress Nginx，为应用添加HTTP路由规则：

```bash
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm upgrade --install ingress-nginx ingress-nginx \
  --repo https://kubernetes.github.io/ingress-nginx \
  --namespace ingress-nginx --create-namespace
```

### 6.使用挂载盘 `/mnt/storage`：

* 移除默认的 `local-path StorageClass` 标记：

{% code overflow="wrap" %}

```bash
kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
```

{% endcode %}

* 创建并设置新的存储类为默认：

创建 `storageclass.yaml`文件，并填入以下内容：

```bash
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: local-storage
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
provisioner: rancher.io/local-path
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
parameters:
  path: "/mnt/storage"
```

应用StorageClass到K3s集群：

```bash
kubectl apply -f storageclass.yaml
```

* 更新 ConfigMap 路径为 `/mnt/storage`：

{% code overflow="wrap" %}

```bash
kubectl patch configmap local-path-config -n kube-system --type=json -p='[{"op": "replace", "path": "/data/config.json", "value":"{\n  \"nodePathMap\":[\n  {\n    \"node\":\"DEFAULT_PATH_FOR_NON_LISTED_NODES\",\n    \"paths\":[\"/mnt/storage\"]\n  }\n  ]\n}"}]'
```

{% endcode %}

</details>

<details>

<summary><strong>老节点升级</strong></summary>

#### **1.移除旧版本**

在下载最新版本之前，先移除旧版本的程序：

```
rm $(which titan-l1-guardian)
```

#### **2.下载最新版软件**：

访问以下链接下载最新版本的 Titan Guardian 软件包：

{% code overflow="wrap" %}

```
https://github.com/Titannet-dao/titan-node/releases/download/v0.1.20/titan-l1-guardian
```

{% endcode %}

#### 3.替换旧版本并更新权限：

替换现有程序并确保新程序具有适当的执行权限：

```
mv titan-l1-guardian /usr/local/bin/
chmod 0755 /usr/local/bin/titan-l1-guardian
```

*备注：如果您在打包时已经设置了正确的执行权限，那么这一步可以省略。*

#### 4. 启动新版本：

启动新版本程序。

### **重要提醒：**

* <mark style="color:red;">**重启节点**</mark>： 请确保在更新后立即重启您的节点，以确保更新生效。🔄
* <mark style="color:red;">**新增网络端口**</mark>：
  * 80 TCP: 用于HTTP通信。
  * 443 TCP: 用于HTTPS通信。

</details>

* 执行以下命令以确认更新成功：

```bash
titan-l1-guardian -v
```

<figure><img src="/files/Z6V2ccOvhxio6JNPX7AM" alt=""><figcaption><p>版本信息如图所示，即表示升级成功。✅</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://titannet.gitbook.io/titan-network-cn/3-ce-ka-xi-ni-ce-shi-wang/yun-xing-jie-dian/l1-guardian-jie-dian/geng-xin-tong-zhi/release-v0.1.20-cassini-testnet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
