managing-astro-local-env
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAstro Local Environment
Astro本地环境
This skill helps you manage your local Airflow environment using the Astro CLI.
To set up a new project, see the setting-up-astro-project skill. When Airflow is running, use MCP tools from authoring-dags and testing-dags skills.
本技能可帮助您使用Astro CLI管理本地Airflow环境。
如需创建新项目,请查看setting-up-astro-project技能。 当Airflow运行时,可使用authoring-dags和testing-dags技能中的MCP工具。
Start / Stop / Restart
启动/停止/重启
bash
undefinedbash
undefinedStart local Airflow (webserver at http://localhost:8080)
启动本地Airflow(Web服务器地址:http://localhost:8080)
astro dev start
astro dev start
Stop containers (preserves data)
停止容器(保留数据)
astro dev stop
astro dev stop
Kill and remove volumes (clean slate)
终止并移除卷(恢复初始状态)
astro dev kill
astro dev kill
Restart all containers
重启所有容器
astro dev restart
astro dev restart
Restart specific component
重启特定组件
astro dev restart --scheduler
astro dev restart --webserver
**Default credentials:** admin / admin
**Restart after modifying:** `requirements.txt`, `packages.txt`, `Dockerfile`
---astro dev restart --scheduler
astro dev restart --webserver
**默认凭据:** admin / admin
**修改后需重启的文件:** `requirements.txt`、`packages.txt`、`Dockerfile`
---Check Status
检查状态
bash
astro dev psbash
astro dev psView Logs
查看日志
bash
undefinedbash
undefinedAll logs
查看所有日志
astro dev logs
astro dev logs
Specific component
查看特定组件日志
astro dev logs --scheduler
astro dev logs --webserver
astro dev logs --scheduler
astro dev logs --webserver
Follow in real-time
实时跟踪日志
astro dev logs -f
---astro dev logs -f
---Access Container Shell
访问容器Shell
bash
undefinedbash
undefinedBash into scheduler container
进入scheduler容器的Bash环境
astro dev bash
astro dev bash
Run Airflow CLI commands
运行Airflow CLI命令
astro dev run airflow info
astro dev run airflow dags list
---astro dev run airflow info
astro dev run airflow dags list
---Troubleshooting
故障排查
| Issue | Solution |
|---|---|
| Port 8080 in use | Stop other containers or edit |
| Container won't start | |
| Package install failed | Check |
| DAG not appearing | Run |
| Out of disk space | |
| 问题 | 解决方案 |
|---|---|
| 端口8080被占用 | 停止其他容器或编辑 |
| 容器无法启动 | 执行 |
| 包安装失败 | 检查 |
| DAG未显示 | 运行 |
| 磁盘空间不足 | 执行 |
Reset Environment
重置环境
When things are broken:
bash
astro dev kill
astro dev start当环境出现严重问题时:
bash
astro dev kill
astro dev startUpgrade Airflow
升级Airflow
Test compatibility first
先测试兼容性
bash
astro dev upgrade-testbash
astro dev upgrade-testChange version
更改版本
-
Edit:
DockerfiledockerfileFROM quay.io/astronomer/astro-runtime:13.0.0 -
Restart:bash
astro dev kill && astro dev start
-
编辑:
DockerfiledockerfileFROM quay.io/astronomer/astro-runtime:13.0.0 -
重启环境:bash
astro dev kill && astro dev start
Related Skills
相关技能
- setting-up-astro-project: Initialize projects and configure dependencies
- authoring-dags: Write DAGs (uses MCP tools, requires running Airflow)
- testing-dags: Test DAGs (uses MCP tools, requires running Airflow)
- setting-up-astro-project: 初始化项目并配置依赖
- authoring-dags: 编写DAG(使用MCP工具,需Airflow处于运行状态)
- testing-dags: 测试DAG(使用MCP工具,需Airflow处于运行状态)