Permalink
Browse files

add README, fix some bugs

  • Loading branch information...
1 parent b68835f commit 6b7e999329ddcde5465e95460133e18df4cccfa6 flex committed Jun 1, 2015
Showing with 49 additions and 3 deletions.
  1. +1 −1 Dockerfile
  2. +46 −0 README.md
  3. +1 −1 run.sh
  4. +1 −1 supervisord.conf
View
@@ -13,6 +13,6 @@ ADD conf /conf
ADD startup.sh /scripts/startup.sh
ADD supervisord.conf /etc/supervisor/supervisord.conf
-EXPOSE 8433 6030 5050 8080 8081 6060
+EXPOSE 8433 6030 5050 8080 8081 6060 5090
CMD ["/usr/bin/supervisord"]
View
@@ -0,0 +1,46 @@
+# Open-Falcon Docker Demo
+
+## 部署
+* **请只在测试环境使用此 Demo**
+* 拉取镜像
+
+```
+docker pull frostynova/open-falcon-docker
+```
+* 使用仓库中的 `run.sh` 运行镜像
+* 修改 `/data/open-falcon/conf` 中的配置文件:
+ * `portal.py` 替换 `UIC_ADDRESS``external` 部分为 Host IP
+ * `fe.cfg` 替换如下部分 IP 为 Host IP
+
+```
+ "shortcut": {
+ "falconPortal": "http://127.0.0.1:5050/",
+ "falconDashboard": "http://127.0.0.1:8081/",
+ "falconAlarm": "http://127.0.0.1:6060/"
+ }
+```
+
+* 重启修改了配置的组件:
+
+```
+docker exec frostynova/open-falcon-docker supervisorctl restart fe
+docker exec frostynova/open-falcon-docker supervisorctl restart portal
+```
+
+* 访问 Host IP 的 8080 端口即可
+* 使用 `http://hostip:8080/root?password=abc``root` 密码重置为 `abc`
+* 在需要监控的主机部署 [agent](https://github.com/open-falcon/doc/wiki/Install-Graph-components#agent),修改其配置文件:
+ * `transfer``enabled` 设为 `true``addr` 修改为:`Host IP:8433`
+ * `heartbeat``enabled` 设为 `true``addr` 修改为:`Host IP:6030`
+* 启动 `agent`
+
+## 注意
+
+* 为了便于部署,除了 `agent` 其他组件都放在了一起,由 `supervisord` 控制,牺牲了 HA 和扩展性
+* `volume` 了四个目录,分别是:
+ * 所有配置文件:`/data/open-falcon/conf`
+ * 监控数据文件:`/data/open-falcon/data`
+ * 数据库文件:`/data/open-falcon/mysql`
+ * 所有日志文件:`/data/open-falcon/logs`
+* 未做细致的清理工作,镜像大小接近 `1G`
+* 本地 Build 请使用 `local` 分支
View
@@ -3,4 +3,4 @@
HOST_DIR=/data/open-falcon
DOCKER_DIR=/home/work/open-falcon
-docker run -td -v $HOST_DIR/conf:$DOCKER_DIR/conf -v $HOST_DIR/data:$DOCKER_DIR/data -v $HOST_DIR/logs:$DOCKER_DIR/logs -v $HOST_DIR/mysql:$DOCKER_DIR/mysql -p 8433:8433 -p 6030:6030 -p 5050:5050 -p 8080:8080 -p 8081:8081 -p 6060:6060 frostynova/open-falcon-docker
+docker run -td -v $HOST_DIR/conf:$DOCKER_DIR/conf -v $HOST_DIR/data:$DOCKER_DIR/data -v $HOST_DIR/logs:$DOCKER_DIR/logs -v $HOST_DIR/mysql:$DOCKER_DIR/mysql -p 8433:8433 -p 6030:6030 -p 5050:5050 -p 8080:8080 -p 8081:8081 -p 6060:6060 -p 5090:5090 frostynova/open-falcon-docker
View
@@ -29,7 +29,7 @@ autostart=false
priority = 100
[program:redis]
-user = work
+user = redis
command = /usr/bin/redis-server /home/work/open-falcon/conf/redis.conf
stdout_logfile = /home/work/open-falcon/logs/%(program_name)s.log
stderr_logfile = /home/work/open-falcon/logs/%(program_name)s.err

0 comments on commit 6b7e999

Please sign in to comment.