跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

test-misc.yaml

127 行 · 2.8 KB历史下载
1# The test template for testing misc configurations:
2# - disk
3# - snapshots
4# - (More to come)
5#
6base: template:ubuntu-22.04
7
8# 9p is not compatible with `limactl snapshot`
9mountTypesUnsupported: ["9p"]
10mounts:
11- location: "~"
12 writable: true
13- location: "/tmp/lima test dir with spaces"
14 writable: true
15
16param:
17 ANSIBLE: ansible
18 BOOT: boot
19 DEPENDENCY: dependency
20 PROBE: probe
21 SYSTEM: system
22 USER: user
23 YQ: yq
24
25provision:
26- mode: ansible
27 playbook: ./hack/ansible-test.yaml
28- mode: boot
29 script: "touch /tmp/param-$PARAM_BOOT"
30- mode: dependency
31 script: "touch /tmp/param-$PARAM_DEPENDENCY"
32- mode: system
33 script: |
34 touch /tmp/param-$PARAM_SYSTEM
35
36 # port forwarding test setup
37 apt-get update
38 apt-get install -y nginx python3
39 systemctl enable nginx
40 systemctl start nginx
41
42 cat > /etc/systemd/system/test-server-9080.service << 'EOF'
43 [Unit]
44 Description=Test Server on Port 9080
45 After=network.target
46
47 [Service]
48 Type=simple
49 User=root
50 ExecStart=/usr/bin/python3 -m http.server 9080 --bind 127.0.0.1
51 Restart=always
52
53 [Install]
54 WantedBy=multi-user.target
55 EOF
56
57 cat > /etc/systemd/system/test-server-9070.service << 'EOF'
58 [Unit]
59 Description=Test Server on Port 9070
60 After=network.target
61
62 [Service]
63 Type=simple
64 User=root
65 ExecStart=/usr/bin/python3 -m http.server 9070 --bind 127.0.0.1
66 Restart=always
67
68 [Install]
69 WantedBy=multi-user.target
70 EOF
71
72 mkdir -p /var/www/html-9080
73 mkdir -p /var/www/html-9070
74
75 echo '<html><body><h1>Dynamic port 9080</h1></body></html>' > /var/www/html-9080/index.html
76 echo '<html><body><h1>Dynamic port 9070</h1></body></html>' > /var/www/html-9070/index.html
77
78 systemctl daemon-reload
79 systemctl enable test-server-9080
80 systemctl enable test-server-9070
81 systemctl start test-server-9080
82 systemctl start test-server-9070
83
84- mode: user
85 script: "touch /tmp/param-$PARAM_USER"
86- mode: data
87 path: /etc/sysctl.d/99-inotify.conf
88 content: |
89 fs.inotify.max_user_watches = 524288
90 fs.inotify.max_user_instances = 512
91- mode: yq
92 path: "/tmp/param-{{.Param.YQ}}.json"
93 expression: .YQ = "{{.Param.YQ}}"
94
95probes:
96- mode: readiness
97 script: |
98 #!/bin/sh
99 touch /tmp/param-$PARAM_PROBE
100
101# in order to use this example, you must first create the disks. run:
102# $ limactl disk create data --size 10G
103# $ limactl disk create swap --size 2G
104additionalDisks:
105- "data"
106- name: "swap"
107 format: true
108 fsType: swap
109
110user:
111 name: john
112 comment: John Doe
113 home: "/home/{{.User}}-{{.User}}"
114 uid: 4711
115 # Ubuntu has identical /bin/bash and /usr/bin/bash
116 shell: /usr/bin/bash
117
118portForwards:
119- guestPort: 80
120 hostPort: 9090
121 static: true
122- guestPort: 9080
123 hostPort: 29080
124 static: false
125- guestPort: 9070
126 hostPort: 29070
127 static: false