diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 783dc27ddc..51d1e697ad 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -281,17 +281,6 @@ function getGuideSidebarZhCN() { { text: '常见问题答疑', link: '/guide/lxd/lxd_qa.html' } ] }, - { - text: '屏蔽滥用', - collapsed: true, - items: [ - { text: '通过iptables', link: '/guide/block/block_iptables.html' }, - { text: '在PVE上', link: '/guide/block/block_pve.html' }, - { text: '在INCUS上', link: '/guide/block/block_incus.html' }, - { text: '在LXD上', link: '/guide/block/block_lxd.html' }, - { text: '在DOCKER上', link: '/guide/block/block_docker.html' }, - ] - }, { text: 'Containerd', collapsed: true, @@ -336,6 +325,17 @@ function getGuideSidebarZhCN() { { text: '常见问题答疑', link: '/guide/kubevirt/kubevirt_qa.html' } ] }, + { + text: '屏蔽滥用', + collapsed: true, + items: [ + { text: '通过iptables', link: '/guide/block/block_iptables.html' }, + { text: '在PVE上', link: '/guide/block/block_pve.html' }, + { text: '在INCUS上', link: '/guide/block/block_incus.html' }, + { text: '在LXD上', link: '/guide/block/block_lxd.html' }, + { text: '在DOCKER上', link: '/guide/block/block_docker.html' }, + ] + }, { text: '捐赠', collapsed: true, @@ -477,17 +477,6 @@ function getGuideSidebarEnUS() { { text: 'FAQ', link: '/en/guide/lxd/lxd_qa.html' } ] }, - { - text: 'Block Abuse', - collapsed: true, - items: [ - { text: 'via iptables', link: '/en/guide/block/block_iptables.html' }, - { text: 'In PVE', link: '/en/guide/block/block_pve.html' }, - { text: 'In INCUS', link: '/en/guide/block/block_incus.html' }, - { text: 'In LXD', link: '/en/guide/block/block_lxd.html' }, - { text: 'In DOCKER', link: '/en/guide/block/block_docker.html' }, - ] - }, { text: 'Containerd', collapsed: true, @@ -532,6 +521,17 @@ function getGuideSidebarEnUS() { { text: 'FAQ', link: '/en/guide/kubevirt/kubevirt_qa.html' } ] }, + { + text: 'Block Abuse', + collapsed: true, + items: [ + { text: 'via iptables', link: '/en/guide/block/block_iptables.html' }, + { text: 'In PVE', link: '/en/guide/block/block_pve.html' }, + { text: 'In INCUS', link: '/en/guide/block/block_incus.html' }, + { text: 'In LXD', link: '/en/guide/block/block_lxd.html' }, + { text: 'In DOCKER', link: '/en/guide/block/block_docker.html' }, + ] + }, { text: 'Donation', collapsed: true, diff --git a/docs/en/guide/oneclickvirt/images/base1.png b/docs/en/guide/oneclickvirt/images/base1.png new file mode 100644 index 0000000000..422b9c38c6 Binary files /dev/null and b/docs/en/guide/oneclickvirt/images/base1.png differ diff --git a/docs/en/guide/oneclickvirt/images/base2.png b/docs/en/guide/oneclickvirt/images/base2.png new file mode 100644 index 0000000000..da1d6084c5 Binary files /dev/null and b/docs/en/guide/oneclickvirt/images/base2.png differ diff --git a/docs/en/guide/oneclickvirt/images/bw2.png b/docs/en/guide/oneclickvirt/images/bw2.png index e4374682ef..54b2aae020 100644 Binary files a/docs/en/guide/oneclickvirt/images/bw2.png and b/docs/en/guide/oneclickvirt/images/bw2.png differ diff --git a/docs/en/guide/oneclickvirt/images/bw3.png b/docs/en/guide/oneclickvirt/images/bw3.png index 245d666f5f..9ac3df12c0 100644 Binary files a/docs/en/guide/oneclickvirt/images/bw3.png and b/docs/en/guide/oneclickvirt/images/bw3.png differ diff --git a/docs/en/guide/oneclickvirt/images/bw4.png b/docs/en/guide/oneclickvirt/images/bw4.png new file mode 100644 index 0000000000..c39034b42c Binary files /dev/null and b/docs/en/guide/oneclickvirt/images/bw4.png differ diff --git a/docs/en/guide/oneclickvirt/images/bw5.png b/docs/en/guide/oneclickvirt/images/bw5.png new file mode 100644 index 0000000000..f297521b1a Binary files /dev/null and b/docs/en/guide/oneclickvirt/images/bw5.png differ diff --git a/docs/en/guide/oneclickvirt/images/bw6.png b/docs/en/guide/oneclickvirt/images/bw6.png new file mode 100644 index 0000000000..c73d855856 Binary files /dev/null and b/docs/en/guide/oneclickvirt/images/bw6.png differ diff --git a/docs/en/guide/oneclickvirt/images/duihuan1.jpg b/docs/en/guide/oneclickvirt/images/duihuan1.jpg new file mode 100644 index 0000000000..7ab281dee2 Binary files /dev/null and b/docs/en/guide/oneclickvirt/images/duihuan1.jpg differ diff --git a/docs/en/guide/oneclickvirt/images/duihuan2.png b/docs/en/guide/oneclickvirt/images/duihuan2.png new file mode 100644 index 0000000000..23a18555c7 Binary files /dev/null and b/docs/en/guide/oneclickvirt/images/duihuan2.png differ diff --git a/docs/en/guide/oneclickvirt/images/setmore2.png b/docs/en/guide/oneclickvirt/images/setmore2.png index dce40d38b7..b903e48930 100644 Binary files a/docs/en/guide/oneclickvirt/images/setmore2.png and b/docs/en/guide/oneclickvirt/images/setmore2.png differ diff --git a/docs/en/guide/oneclickvirt/oneclickvirt_usage.md b/docs/en/guide/oneclickvirt/oneclickvirt_usage.md index ea54963a87..006713149e 100644 --- a/docs/en/guide/oneclickvirt/oneclickvirt_usage.md +++ b/docs/en/guide/oneclickvirt/oneclickvirt_usage.md @@ -34,7 +34,9 @@ Below are the steps for setting up nodes. Required and mandatory steps must be f ### Basic Information (Required) -![](./images/base.png) +![](./images/base1.png) + +![](./images/base2.png) The server name should preferably use only English letters and numbers, avoid special characters, and ideally be within 6 characters. When creating containers or virtual machines later, this server name will be automatically added as a prefix. @@ -44,6 +46,8 @@ For SSH address, fill in the node's public IPv4 address or internal SSH connecti NAT port mapping prioritizes using the port IP for mapping. If no specific port IP is provided, the SSH address IP will be used for mapping. Neither needs to be a public IPv4 address. +Node mode can be set to either a clean node or a node with existing instances. If you choose the latter, the system will automatically detect the existing instances on that node and generate the corresponding redemption codes in Redemption Code Management, bound to the current administrator by default. After switching to the regular user view, the imported existing instances will be visible. + In the port field, fill in the port for SSH connection to the node. Description can note some information about the current node, visible only to administrators. @@ -152,13 +156,33 @@ Not recommended to modify the mapping method unless you know what this setting d ![](./images/bw3.png) -Literal meaning: set the maximum bandwidth and total available traffic calculated by natural month for instances created on the node. Traffic monitoring and traffic statistics are not automatically enabled by default. +Simply put, this sets the maximum bandwidth for instances created on the node and the total available traffic calculated on a natural-month basis. Traffic monitoring and traffic statistics are not enabled by default. -Starting traffic monitoring will have a corresponding memory burden because traffic statistics data needs to be cached. Even after extreme optimization by this project, it will still increase with bandwidth. Don't enable traffic statistics if you don't have enough memory. +#### agent (Recommended) -If traffic statistics are enabled, pay attention to the statistics mode. The default statistics mode is the most universal. If your local performance is good enough (mainly enough memory), you can choose higher collection frequency and collection quantity. If performance is very poor, it's recommended to choose the last tier. Custom parameters are also supported, but not recommended for beginners to modify; the preset modes are sufficient. +A traffic and resource statistics project built with Rust. After enabling traffic monitoring and selecting agent monitoring, choose Deploy in the monitoring management page. -If traffic statistics are enabled, note that the allocated bandwidth for levels should not be too large. Monitoring will dynamically generate configuration files according to the allocated bandwidth for monitoring. The larger the bandwidth, the more memory monitoring occupies. +![](./images/bw4.png) + +![](./images/bw5.png) + +After deployment completes, click Detect Agent Status to check whether it loaded successfully. + +This method is suitable for nodes running a Linux kernel and supporting iptables or nftables. By default it uses nftables for monitoring. If you need custom iptables monitoring or want to exclude traffic for a specific inbound or outbound IP from monitoring, you need to click Edit Configuration in the current popup and then save and synchronize monitoring before the configuration is actually applied. + +![](./images/bw6.png) + +Generally, custom configuration is not needed. The default configuration is sufficient for daily use. + +#### pmacct (Not Recommended) + +This method is for nodes that do not support nftables or iptables commands, such as Alpine hosts or non-Linux kernels. In those cases only, use this traffic monitoring method. In other scenarios, agent mode is still recommended. + +Enabling pmacct traffic monitoring creates a memory burden because traffic statistics data must be cached. Even after this project is heavily optimized, memory usage still grows with bandwidth, so do not enable traffic statistics if you do not have enough memory. + +If traffic statistics are enabled, pay attention to the statistics mode. The default mode is the most universal. If your local performance is good enough, mainly with sufficient memory, you can choose a higher collection frequency and quantity. If performance is very poor, it is recommended to choose the last tier. Custom parameters are supported as well, but beginners should not modify them; the preset modes are sufficient. + +If traffic statistics are enabled, note that the bandwidth assigned per level should not be too large. Monitoring will dynamically generate configuration files based on the assigned bandwidth. The larger the bandwidth, the more memory the monitor uses. | Level | Instance Bandwidth | `plugin_pipe_size` | `sql_cache_entries` | Base Usage | Burst Usage | |---:|:---:|:---:|:---:|:---:|:---| @@ -226,6 +250,22 @@ If you need to enable API operation mode, after successfully saving the node set ![](./images/autoapi3.png) +Application and Claim Control: + +By default, regular users can choose the system and create instances using configurations within their level. If you enable redemption-code-only claiming, you need to batch-generate redemption codes in Redemption Code Management after the corresponding instances are generated, and then distribute the codes to users for redemption. In short, only enable this feature if you need to batch-create instances or revoke regular users' ability to freely choose the system and configuration. + +![](./images/duihuan1.png) + +![](./images/duihuan2.png) + +Hardware Monitoring: + +If you want to enable this feature, you must also enable agent monitoring in Monitoring Management. Without deploying the corresponding agent monitoring, hardware monitoring cannot be used. The collection interval and related parameters can be customized on the configuration edit page in Monitoring Management. + +![](./images/bw6.png) + +By default, the system monitors CPU, memory, and disk usage for instances over the last 24 hours, and only keeps 24 hours of data. + ### Hardware Configuration (Optional) ![](./images/hardwareconfig.png) diff --git a/docs/guide/oneclickvirt/images/base1.png b/docs/guide/oneclickvirt/images/base1.png new file mode 100644 index 0000000000..422b9c38c6 Binary files /dev/null and b/docs/guide/oneclickvirt/images/base1.png differ diff --git a/docs/guide/oneclickvirt/images/base2.png b/docs/guide/oneclickvirt/images/base2.png new file mode 100644 index 0000000000..da1d6084c5 Binary files /dev/null and b/docs/guide/oneclickvirt/images/base2.png differ diff --git a/docs/guide/oneclickvirt/images/bw2.png b/docs/guide/oneclickvirt/images/bw2.png index e4374682ef..54b2aae020 100644 Binary files a/docs/guide/oneclickvirt/images/bw2.png and b/docs/guide/oneclickvirt/images/bw2.png differ diff --git a/docs/guide/oneclickvirt/images/bw3.png b/docs/guide/oneclickvirt/images/bw3.png index 245d666f5f..9ac3df12c0 100644 Binary files a/docs/guide/oneclickvirt/images/bw3.png and b/docs/guide/oneclickvirt/images/bw3.png differ diff --git a/docs/guide/oneclickvirt/images/bw4.png b/docs/guide/oneclickvirt/images/bw4.png new file mode 100644 index 0000000000..c39034b42c Binary files /dev/null and b/docs/guide/oneclickvirt/images/bw4.png differ diff --git a/docs/guide/oneclickvirt/images/bw5.png b/docs/guide/oneclickvirt/images/bw5.png new file mode 100644 index 0000000000..f297521b1a Binary files /dev/null and b/docs/guide/oneclickvirt/images/bw5.png differ diff --git a/docs/guide/oneclickvirt/images/bw6.png b/docs/guide/oneclickvirt/images/bw6.png new file mode 100644 index 0000000000..c73d855856 Binary files /dev/null and b/docs/guide/oneclickvirt/images/bw6.png differ diff --git a/docs/guide/oneclickvirt/images/duihuan1.jpg b/docs/guide/oneclickvirt/images/duihuan1.jpg new file mode 100644 index 0000000000..7ab281dee2 Binary files /dev/null and b/docs/guide/oneclickvirt/images/duihuan1.jpg differ diff --git a/docs/guide/oneclickvirt/images/duihuan2.png b/docs/guide/oneclickvirt/images/duihuan2.png new file mode 100644 index 0000000000..23a18555c7 Binary files /dev/null and b/docs/guide/oneclickvirt/images/duihuan2.png differ diff --git a/docs/guide/oneclickvirt/images/setmore2.png b/docs/guide/oneclickvirt/images/setmore2.png index dce40d38b7..b903e48930 100644 Binary files a/docs/guide/oneclickvirt/images/setmore2.png and b/docs/guide/oneclickvirt/images/setmore2.png differ diff --git a/docs/guide/oneclickvirt/oneclickvirt_install.md b/docs/guide/oneclickvirt/oneclickvirt_install.md index eaad7a35ca..58b61092f8 100644 --- a/docs/guide/oneclickvirt/oneclickvirt_install.md +++ b/docs/guide/oneclickvirt/oneclickvirt_install.md @@ -322,7 +322,7 @@ docker image rm -f spiritlhl/oneclickvirt:latest docker pull spiritlhl/oneclickvirt:latest ``` -然后再按全新环境下开设的步骤来,注意等待12秒后打开前端,会发现已自动越过初始化界面,因为数据已持久化导入。 +然后再部署开设容器即可(按全新部署那样来),注意等待12秒后打开前端,会发现已自动越过初始化界面,因为数据已持久化导入。 然后覆写原有的配置文件: diff --git a/docs/guide/oneclickvirt/oneclickvirt_usage.md b/docs/guide/oneclickvirt/oneclickvirt_usage.md index 216a8fe97c..d3d92165ed 100644 --- a/docs/guide/oneclickvirt/oneclickvirt_usage.md +++ b/docs/guide/oneclickvirt/oneclickvirt_usage.md @@ -34,7 +34,9 @@ outline: deep ### 基本信息(必填) -![](./images/base.png) +![](./images/base1.png) + +![](./images/base2.png) 服务器名称最好仅英文+数字,不要用特殊字符,最好控制在6个字符以内,后续开设容器或虚拟机的时候,会自动带上这个服务器名称前缀。 @@ -46,6 +48,8 @@ NAT端口映射优先使用端口IP进行映射,如果不提供具体的端口 端口框填写SSH连接节点的端口。 +节点模式可选择纯净节点还是有实例的节点,如果选择后者将自动检索节点机器上当前已有的实例,然后对应的在兑换码管理处生成对应的兑换码,默认绑定到当前的管理员的权限下,切换到普通用户视图可见对应的已有实例已导入。 + 描述可备注当前节点的一些信息,仅管理员可见。 状态默认为启用状态,允许后面的健康检测后,被普通用户申请领取开设实例。 @@ -154,7 +158,27 @@ SSH超时配置是设计测试连通性和优化容错率的,也可以用来 字面意思,设置节点开设出的实例的最大带宽和以自然月计算的可用流量总量,默认不自动启用流量监控和流量统计。 -启动流量监控会有对应的内存负担,因为需要缓存流量统计数据,哪怕本项目极致优化后,还是会随着带宽的增大而增大,内存不够用的不要开启流量统计。 +#### agent(推荐) + +使用rust构建的流量和资源统计项目,需要在启动流量监控并选择agent监控后,在后续的监控管理界面选择部署 + +![](./images/bw4.png) + +![](./images/bw5.png) + +部署完成后点击检测Agent状态查看是否成功loading。 + +本方法适配Linux内核且支持iptables或nftables的节点,一般使用该方法默认使用nftables进行监测,如果需要自定义为iptables监控或者过滤掉对于某个出入IP地址的流量不纳入监控,那就需要在当前弹窗内点击编辑配置,并保存同步监控,才能真正应用配置 + +![](./images/bw6.png) + +一般不需要进行自定义配置,默认的配置以及足够日常使用了。 + +#### pmacct(不推荐) + +该方法适配节点本身不支持nftables或者iptables命令的情况,比如宿主机是alpine的时候或者非linux内核的情况下,才需要使用本方法进行流量监控,其他情况还是推荐使用agent模式。 + +启动pmacct的流量监控会有对应的内存负担,因为需要缓存流量统计数据,哪怕本项目极致优化后,还是会随着带宽的增大而增大,内存不够用的不要开启流量统计。 启用了流量统计的话,要注意统计模式,默认的统计模式是最普适的,如果你本地的性能足够好(主要是内存够多),可选择更高的采集频率和采集数量,如果性能非常差,建议选择最后一档。当然也支持自定义参数,但不推荐新手修改,预设的模式足矣。 @@ -226,6 +250,22 @@ SSH超时配置是设计测试连通性和优化容错率的,也可以用来 ![](./images/autoapi3.png) +申请领取控制: + +默认是支持普通用户选择系统和对于等级内的配置开设实例的,但如果启用仅兑换码领取,那么需要在兑换码管理处点击批量生成兑换码,等待兑换码对于的实例生成完毕后,兑换码给用户进行兑换。简单的说,你如果需要批量开设实例或者需要收回普通用户自写选择系统及配置的权力的话,才需要开启本功能。 + +![](./images/duihuan1.png) + +![](./images/duihuan2.png) + +硬件监控: + +如果要启用本功能,那么后续在监控管理处必须启用agent监控,不部署对于的agent监控,将无法使用硬件监控。硬件监控的相关采集参数可自定义间隔,在监控管理的配置编辑分页有相关的参数设置。 + +![](./images/bw6.png) + +默认将监控实例的CPU、内存、硬盘的24小时内的使用情况,仅保留24小时的数据。 + ### 硬件配置(可选) ![](./images/hardwareconfig.png) @@ -278,7 +318,7 @@ API是否可用不影响具体使用,自动配置API是非必需的 ## 配置文件 -默认的系统配置已经足够轻度使用了,如果需要高级自定义则需要修改配置文件,或初始化后在管理员界面进行修改。 +默认的系统配置已经足够轻度使用了,如果需要高级自定义则需要修改配置文件,或初始化后在管理员界面进行修改。默认数据库不可用时以配置文件为权威配置来源,数据库可用时将以数据库中的配置为权威配置来源。简单的说,初始化后相关配置修改不建议再修改系统配置文件,建议只在浏览器上通过管理员面板修改配置。 https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml