01
Composition与System概述
什么是Composition文件、System文件,两者关系与区别,系统设计中的角色
概念基础
02
YAML基础
语法规则、缩进层级、列表字典、锚点别名、多行字符串
YAML语法
03
Composition文件结构
顶层字段解析 (services, networks, volumes, configs, secrets),版本声明,命名规范
结构顶层
04
Service定义详解 (上)
image, build, container_name, ports, expose, environment, env_file
Service核心
05
Service定义详解 (中)
volumes, volumes_from, tmpfs, configs, secrets, dns, dns_search
存储配置
06
Service定义详解 (下)
depends_on, links, networks, network_mode, restart, healthcheck, deploy
依赖部署
07
Network配置
网络驱动类型 (bridge, host, overlay...),自定义网络,IPAM,外部网络
网络驱动
08
Volume配置
卷驱动、绑定挂载、命名卷、生命周期管理、卷标签
存储卷
09
Config与Secret管理
configs定义与使用、secrets定义与使用、文件权限、外部配置源
安全配置
10
多环境Composition
extends, profiles, 环境变量替换, .env文件, 多文件合并
环境进阶
11
Systemd Service文件结构
Unit、Service、Install 三章节详解,常用字段列表
Systemd结构
12
Unit章节配置
Description, Documentation, After, Before, Requires, Wants, BindsTo, PartOf
Unit依赖
13
Service章节配置 (上)
Type (simple, forking, oneshot...), ExecStart, ExecStop, ExecReload
Service执行
14
Service章节配置 (中)
User, Group, WorkingDirectory, RootDirectory, Environment, EnvironmentFile, StandardOutput/Error
环境上下文
15
Service章节配置 (下)
Restart, RestartSec, StartLimitInterval, TimeoutStopSec, KillMode, KillSignal
重启超时
16
Install章节配置
WantedBy, RequiredBy, Also, Alias, DefaultInstance
安装启用
17
Systemd Timer配置
OnCalendar语法, OnUnitActiveSec, OnBootSec, AccuracySec, Persistent
定时器日历
18
Systemd Path配置
PathExists, PathChanged, PathModified, DirectoryNotEmpty, Unit
路径监控
19
Systemd Socket配置
ListenStream, ListenDatagram, Accept, SocketMode, SocketUser, SocketGroup
SocketIPC
20
Systemd Target与Snapshot
Target定义, 特殊Target, 自定义Target, Snapshot管理
Target快照
21
Systemd依赖管理
依赖类型详解, 循环依赖检测, 事务与作业, 启动顺序控制
依赖事务
22
Systemd资源控制
CPUQuota, MemoryMax, TasksMax, IOWeight, CPUShares, CPUSet
资源CGroup
23
Systemd安全特性
ProtectSystem, ProtectHome, PrivateTmp, NoNewPrivileges, CapabilityBoundingSet, SystemCallFilter
安全沙箱
24
Systemd日志管理
journalctl使用, 日志优先级, 大小控制, 持久化日志, 远程日志
日志journald
25
Systemd调试与故障排查
systemctl status, journalctl -xe, systemd-analyze, 调试启动失败
调试分析
26
Composition与Systemd集成
Composition管理Systemd服务, 生成Unit文件, 容器化服务管理
集成DevOps
27
实战案例一:Web应用部署
Nginx + PHP + MySQL,Composition + Systemd 服务
实战Web
28
实战案例二:微服务架构
API Gateway + 多微服务 + 消息队列,Systemd 服务
微服务实战
29
实战案例三:监控栈部署
Prometheus + Grafana + Node Exporter,Systemd 服务
监控实战
30
综合项目:自动化部署与运维
完整系统部署方案,Composition + Systemd,自动化运维
综合项目