apusiclet操作指令
# apusiclet 操作手册
# 使用方法
apusiclet [command]
# 可用命令
build构建制品(preset) 包completion生成指定shell的自动补全脚本compose定义和运行多容器应用程序与pc.exec执行peasecod exec命令filebeats启动file beats服务器help获取任何命令的帮助信息login登录到注册表的容器。logs查看peasecod日志pc显示peasecod预设preset制品包管理repository manager存储库管理器pull从注册表下载容器。push上传容器到注册表。registry注册表apusicletsave将容器保存为镜像。server运行apusic服务器upgrade升级apusiclet命令version查看apusic服务器版本volume查看当前Volumes接口
# 标志选项
# 基础配置
- -M, --M setting=value Module configuration overwrite
- -N, --N Disable actual publishing for testing
- --collector.apusiclet.address string 获取当前虚拟机中服务的运行状态信息 (default "http://localhost:9890")
- --collector.arp.device-exclude string Regexp of arp devices to exclude (mutually exclusive to device-include).
- --collector.arp.device-include string Regexp of arp devices to include (mutually exclusive to device-exclude).
- --collector.arp.netlink Use netlink to gather stats instead of /proc/net/arp. (default true)
- --collector.bcache.priorityStats Expose expensive priority stats.
- --collector.cpu.guest Enables metric node_cpu_guest_seconds_total (default true)
- --collector.cpu.info Enables metric cpu_info
- --collector.cpu.info.bugs-include bugs Filter the bugs field in cpuInfo with a value that must be a regular expression
- --collector.cpu.info.flags-include flags Filter the flags field in cpuInfo with a value that must be a regular expression
- --collector.diskstats.device-exclude string Regexp of diskstats devices to exclude (mutually exclusive to device-include). (default "^(z?ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\d+n\d+p)\d+$")
- --collector.diskstats.device-include string Regexp of diskstats devices to include (mutually exclusive to device-exclude).
- --collector.diskstats.ignored-devices string DEPRECATED: Use collector.diskstats.device-exclude
- --collector.ethtool.device-exclude string Regexp of ethtool devices to exclude (mutually exclusive to device-include).
- --collector.ethtool.device-include string Regexp of ethtool devices to include (mutually exclusive to device-exclude).
- --collector.ethtool.metrics-include string Regexp of ethtool stats to include. (default ".")
- --collector.filesystem.fs-types-exclude string Regexp of filesystem types to exclude for filesystem collector. (default "^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$")
- --collector.filesystem.ignored-fs-types string Regexp of filesystem types to ignore for filesystem collector.
- --collector.filesystem.ignored-mount-points string Regexp of mount points to ignore for filesystem collector.
- --collector.filesystem.mount-points-exclude string Regexp of mount points to exclude for filesystem collector. (default "^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+|var/lib/containers/storage/.+)($|/)")
- --collector.filesystem.mount-timeout duration how long to wait for a mount to respond before marking it as stale (default 5s)
- --collector.filesystem.stat-workers int how many stat calls to process simultaneously (default 4)
- --collector.hwmon.chip-exclude string Regexp of hwmon chip to exclude (mutually exclusive to device-include).
- --collector.hwmon.chip-include string Regexp of hwmon chip to include (mutually exclusive to device-exclude).
- --collector.ipvs.backend-labels string Comma separated list for IPVS backend stats labels. (default "local_address,local_port,remote_address,remote_port,proto,local_mark")
- --collector.netclass.ignore-invalid-speed Ignore devices where the speed is invalid. This will be the default behavior in 2.x.
- --collector.netclass.ignored-devices string Regexp of net devices to ignore for netclass collector. (default "^$")
- --collector.netclass.netlink Use netlink to gather stats instead of /proc/net/dev.
- --collector.netclass_rtnl.with-stats Expose the statistics for each network device, replacing netdev collector.
- --collector.netdev.address-info Collect address-info for every device
- --collector.netdev.device-blacklist string DEPRECATED: Use collector.netdev.device-exclude
- --collector.netdev.device-exclude string Regexp of net devices to exclude (mutually exclusive to device-include).
- --collector.netdev.device-include string Regexp of net devices to include (mutually exclusive to device-exclude).
- --collector.netdev.device-whitelist string DEPRECATED: Use collector.netdev.device-include
- --collector.netdev.enable-detailed-metrics Use (incompatible) metric names that provide more detailed stats on Linux
- --collector.netdev.netlink Use netlink to gather stats instead of /proc/net/dev. (default true)
- --collector.netstat.fields string Regexp of fields to return for netstat collector. (default "^(.(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)(InOctets|OutOctets)|Icmp6?(InMsgs|OutMsgs)|TcpExt(Listen.|Syncookies.|TCPSynRetrans|TCPTimeouts|TCPOFOQueue)|Tcp_(ActiveOpens|InSegs|OutSegs|OutRsts|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts|RcvbufErrors|SndbufErrors))$")
- --collector.ntp.ip-ttl int IP TTL to use while sending NTP query (default 1)
- --collector.ntp.local-offset-tolerance duration Offset between local clock and local ntpd time to tolerate (default 1ms)
- --collector.ntp.max-distance duration Max accumulated distance to the root (default 0s)
- --collector.ntp.protocol-version int NTP protocol version (default 4)
- --collector.ntp.server string NTP server to use for ntp collector (default "127.0.0.1")
- --collector.ntp.server-is-local Certify that collector.ntp.server address is not a public ntp server
- --collector.ntp.server-port int UDP port number to connect to on NTP server (default 123)
- --collector.perf.cpus string Statuses of CPUs from which perf metrics should be collected
- --collector.perf.disable-cache-profilers disable perf cache profilers
- --collector.perf.disable-hardware-profilers disable perf hardware profilers
- --collector.perf.disable-software-profilers disable perf software profilers
- --collector.powersupply.ignored-supplies string Regexp of power supplies to ignore for powersupplyclass collector. (default "^$")
- --collector.qdisc.device-exclude string Regexp of qdisc devices to exclude (mutually exclusive to device-include).
- --collector.qdisc.device-include string Regexp of qdisc devices to include (mutually exclusive to device-exclude).
- --collector.qdisc.fixtures string test fixtures to use for qdisc collector end-to-end testing
- --collector.qdisk.device-exclude string DEPRECATED: Use collector.qdisc.device-exclude
- --collector.qdisk.device-include string DEPRECATED: Use collector.qdisc.device-include
- --collector.rapl.enable-zone-label Enables service unit metric unit_start_time_seconds
- --collector.runit.servicedir string Path to runit service directory. (default "/etc/service")
- --collector.stat.softirq Export softirq calls per vector
- --collector.supervisord.url string XML RPC endpoint. (default "http://localhost:9001/RPC2")
- --collector.systemd.enable-restarts-metrics Enables service unit metric service_restart_total
- --collector.systemd.enable-start-time-metrics Enables service unit metric unit_start_time_seconds
- --collector.systemd.enable-task-metrics Enables service unit tasks metrics unit_tasks_current and unit_tasks_max
- --collector.systemd.private Establish a private, direct connection to systemd without dbus (Strongly discouraged since it requires root. For testing purposes only).
- --collector.systemd.unit-blacklist string DEPRECATED: Use collector.systemd.unit-exclude
- --collector.systemd.unit-exclude string Regexp of systemd units to exclude. Units must both match include and not match exclude to be included. (default ".+.(automount|device|mount|scope|slice)")
- --collector.systemd.unit-include string Regexp of systemd units to include. Units must both match include and not match exclude to be included. (default ".+")
- --collector.systemd.unit-whitelist string DEPRECATED: Use --collector.systemd.unit-include
- --collector.tapestats.ignored-devices string Regexp of devices to ignore for tapestats. (default "^$")
- --collector.textfile.directory string Directory to read text files with metrics from.
- --collector.vmstat.fields string Regexp of fields to return for vmstat collector. (default "^(oom_kill|pgpg|pswp|pg.fault).")
- --collector.wifi.fixtures string test fixtures to use for wifi collector metrics
- --cpuprofile string Write cpu profile to file
- -d, --d string Enable certain debug selectors
- -e, --e Log to stderr and disable syslog/file output
- --environment environmentVar set environment being ran in (default default)
- -h, --help help for apusiclet
- --httpprof string Start pprof http server
- --memprofile string Write memory profile to this file
- --modules string List of enabled modules (comma separated)
- --once Run filebeat only once until all harvesters reach EOF
- --path.procfs string procfs mountpoint. (default "/proc")
- --path.rootfs string rootfs mountpoint. (default "/")
- --path.sysfs string sysfs mountpoint. (default "/sys")
- --path.udev.data string udev data path. (default "/run/udev/data")
- --strict.perms Strict permission checking on config files (default true)
- -v, --v Log at INFO level
# completion
# 描述
为 apusiclet 生成指定 shell 的自动补全脚本。 请参阅每个子命令的帮助以了解如何使用生成的脚本。
# Bash
在当前 shell 会话中加载 apusiclet 补全代码:
source <(apusiclet completion bash)
1
# build
使用 apusiclet 构建一个制品包:
apusiclet preset build <REPOSITORY>/<PROJECT>/<NAME>:<VERSION>
1
# 示例
apusiclet preset build minio:20210422
提示
Name (软件包名称): minio
Version (软件包版本): 20210422
Maintainer (作者): apusic
Preset (软件包): minio-20210422-linux-amd64.tar.gz
WorkDir (工作路径): /root/minio-test
Volumes (绑定挂载卷 [hostPath:containerPath]): ./data:./data
Environment (环境变量): MINIO_ROOT_USER=minioadmin,MINIO_ROOT_PASSWORD=minioadmin
Command (执行命令):
输入 command:: ./minio server ./data/minio
输入 command:: exit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
使用方法
apusiclet preset build [flags]
-f, --file string 名称 of the metadata.json (默认: "./metadata.json")
-h, --help 显示 build 相关帮助信息
1
2
2
全局参数
-M, --M setting=value 模块配置覆盖
-N, --N 禁用实际发布以进行测试
--cpuprofile string 将 CPU 配置文件写入文件
-d, --d string 启用某些调试选择器
-e, --e 日志记录到 stderr 并禁用 syslog/file 输出
--environment environmentVar 设置正在运行的环境 (默认 default)
--httpprof string 启动 pprof HTTP 服务器
--memprofile string 将内存配置文件写入此文件
--modules string 启用模块列表(逗号分隔)
--once 运行 filebeat 仅一次直到所有 harvester 达到 EOF
--strict.perms 对配置文件进行严格的权限检查 (默认 true)
-v, --v 在 INFO 级别记录日志
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# compose
定义和运行多容器应用程序与pc.
# 可用命令
- down: 停止并移除容器
- up: 创建并启动容器
# 使用方法
apusiclet compose [flags]
1
全局参数
-M, --M setting=value 模块配置覆盖
-N, --N 禁用实际发布以进行测试
--cpuprofile string 将 CPU 配置文件写入文件
-d, --d string 启用某些调试选择器
-e, --e 日志记录到 stderr 并禁用 syslog/file 输出
--environment environmentVar 设置正在运行的环境 (默认 default)
--httpprof string 启动 pprof HTTP 服务器
--memprofile string 将内存配置文件写入此文件
--modules string 启用模块列表(逗号分隔)
--once 运行 filebeat 仅一次直到所有 harvester 达到 EOF
--strict.perms 对配置文件进行严格的权限检查 (默认 true)
-v, --v 在 INFO 级别记录日志
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# filebeats
运行filebeats 进程 收集日志信息
# 使用方法
apusiclet filebeats
1
2
2
--apusic-path string 配置文件存放路径 (默认 "/etc/apusiclet")
--context-path string 管控台的 context-path
--data-root string 数据存放的根路径
-h, --help 显示 filebeats 相关帮助信息
-p, --port int32 http server port (默认 9890)
--proxy-enabled 是否开启代理设置 (默认 true)
--proxy-port int32 http server proxy port (默认 9891)
-s, --server string acp manager 管控台地址
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# pc
查询 容器(peasecod)内容
### 可用命令
- create: 创建 peasecod
- get: 获取 peasecod 的命令 YAML
- logs: 查看 peasecod 日志
- ls: 打印 peasecod 列表状态
- restart: 重启容器进程
- rm: 删除 peasecod 命令
- start: 启动容器进程
- stop: 停止容器进程
- workdir: 查看容器的工作目录
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# preset
制品包管理
# 使用方法
apusiclet preset [flags]
1
# 可用命令
- build: 开始构建
- init: 初始化预设
- inspect: 检查 Docker 容器或镜像
- load: 将容器加载为镜像
- ls: 列出仓库预设管理列表
- rm: 删除预设仓库
- run: 运行预设仓库
- save: 将容器保存为镜像
- tag: 创建指向源镜像的目标镜像标签
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
参数:
-h, --help 显示 preset 相关帮助信息
1
# pull
获取制品包
# 使用方法
apusiclet pull [flags]
1
参数:
--platform string Set target platform for build
-h, --help 显示 preset 相关帮助信息
1
2
2
# push
推送制品包
# 使用方法
apusiclet push [flags]
1
参数:
--platform string Set target platform for build
-h, --help 显示 preset 相关帮助信息
1
2
2
# version
获取版本
# 使用方法
apusiclet version
APUSICLET
apusic 中间件生命周期管理
Version: 8.0.4.7
GitRevision: 6ea1ba1758543557be0864d935de99e14c910741
GolangVersion: go1.23.4
BuildStatus: develop
GitTag: v8.0.3-54-g6ea1ba1
Platform: linux/amd64
BuildDate: 2025-07-17-16:58:48
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# save
保存制品包到指定文件
# 使用方法
apusiclet save [flags] -o [flags]
1
参数:
--platform string Set target platform for build
-h, --help 显示 preset 相关帮助信息
1
2
2
# load
加载指定文件 到制品库
# 使用方法
apusiclet load [flags] -o [flags]
1
参数:
--platform string Set target platform for build
-h, --help 显示 preset 相关帮助信息
1
2
2
编辑页面 (opens new window)