Installing StackTach
- 为StackTach创建database,默认使用MySql,也可以 在settings.py 文件中配置其他的.
create stack db
mysql -u root -p
mysql> create database stacktach;
mysql> grant all privileges on stacktach.* to 'root'@'localhost' indentified by '';
exit - 安装django和
./etc/pip-requires.txt由于pip-requires.txt中要求django >=1.5.1 < 1.6.0 ,否则在版本1.8.1出错:nuc:/opt/stack/stacktach$ python worker/start_workers.py
Traceback (most recent call last):
File "worker/start_workers.py", line , in <module>
from django.db import close_connection
ImportError: cannot import name close_connection所以在virtualenv中安装:
stacktach$ virtualenv env1
stacktach$ cd env1/
stacktach$ source bin/activate
$ pip install -r etc/pip-requires.txt - Clone this repo
git clone git://github/openstack/stacktach
- Copy and configure the config files in
./etc(see below for details)mv etc/sample_stacktach_config.sh etc/stacktach_config.json
mv etc/sample_stacktach_worker_config.json etc/stacktach_worker_config.json
stack_config.json:
export STACKTACH_DB_NAME="stacktach"
export STACKTACH_DB_HOST="127.0.0.1"
export STACKTACH_DB_USERNAME="root"
export STACKTACH_DB_PASSWORD=""
export STACKTACH_DB_PORT=""
export STACKTACH_INSTALL_DIR="./"
export STACKTACH_DEPLOYMENTS_FILE="etc/stacktach_worker_config.json"
export STACKTACH_VERIFIER_CONFIG="etc/stacktach_verifier_config.json" export DJANGO_SETTINGS_MODULE="settings"如果你的local OpenStack环境为:
[[local|localrc]] SERVICE_HOST=localhost
DATABASE_PASSWORD=
ADMIN_PASSWORD=
MYSQL_PASSWORD=
DATABASE_TYPE=mysql
RABBIT_PASSWORD=guest
SERVICE_PASSWORD=
SERVICE_TOKEN=ADMINstacktach_worker_config.json可以配置为:
{"deployments": [
{
"name": "east_coast.prod.global",
"durable_queue": false,
"rabbit_host": "127.0.0.1",
"rabbit_port": ,
"rabbit_userid": "guest",
"rabbit_password": "guest",
"rabbit_virtual_host": "/",
"exit_on_exception": true,
"queue_name": "stacktach",
"topics": {
"nova": [
{
"queue": "notifications.info",
"routing_key": "notifications.info"
},
{
"queue": "notifications.error",
"routing_key": "notifications.error"
}
],
"glance": [
{
"queue": "notifications.info",
"routing_key": "notifications.info"
},
{
"queue": "notifications.error",
"routing_key": "notifications.error"
}
]
}
}
]
}- 创建db tables
python manage.py syncdb
You have installed Django's auth system, and don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (leave blank to use 'yuntong'):
Email address: ***@gmail.com
Password:
Password (again):
Superuser created successfully. - Configure OpenStack to publish Notifications back into RabbitMQ (see below)
- Restart the OpenStack services.
- Run the Worker to start consuming messages. (see below)
先fix一个bug:diff --git a/settings.py b/settings.py
index b6d27e5..dba5f2d
--- a/settings.py
+++ b/settings.py
@@ -, +, @@ TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
- install_dir + "templates"
+ install_dir + "templates",运行start_workers:
source etc/stacktach_config.sh
$ python worker/start_workers.py
Starting worker for 'east_coast.prod.global glance'
Starting worker for 'east_coast.prod.global nova'打开rabbitmq的管理界面localhost:15672
- Run the web server (
python manage.py runserver --insecure)python manage.py runserver --insecure
- Point your browser to
http://127.0.0.1:8000(the default server location)StackTach v2 Fork me on GitHub
Choose the Deployment to monitor All
east_coast.prod.global或者访问API: curl -H "Content-Type: application/json" http://localhost:8000/stacky/deployments/ #The list of all available deployments
[["#", "Name"], [1, "east_coast.prod.global"]]
curl -H "Content-Type: application/json" http://localhost:8000/stacky/events/ #The distinct list of all event names
[["Event Name"],
["compute.instance.create.end"], ["compute.instance.create.start"], ["compute.instance.exists"], ["compute.instance.update"],
["port.create.end"], ["port.create.start"], ["port.update.end"], ["port.update.start"], ["scheduler.select_destinations.end"], ["scheduler.select_destinations.start"],
["image.update"], ["scheduler.select_destinations.start"]]
$ curl -H "Content-Type: application/json" http://localhost:8000/stacky/5b329e1f-c7d1-4fbe-bf15-80fcfbb22024/ #Retrieve all notifications for instances with a given UUID. - Click on stuff, see what happens. You can’t hurt anything, it’s all read-only.
参考:
http://stacktach.com/api.html
http://stacktach.com/install.html
http://stacktach.readthedocs.io/en/latest/setup.html
Installing StackTach的更多相关文章
- installing mysql,this may take a few minutes,hold on plz wdcp卡住解决办法
centos6安装wdcp时make in progress卡住的解决办法 今天在一台centos6的vps上安装wdcp出现的这个问题,到安装程序滚动至下面这里时出现"卡死". ...
- MSI Error 1603 installing AppFabric 1.1 / Win7 x64
MSI Error 1603 installing AppFabric 1.1 / Win7 x64 Archived Forums A-B > AppFabric Caching 先说解 ...
- [转]Installing python 2.7 on centos 6.3. Follow this sequence exactly for centos machine only
Okay for centos 6.4 also On apu.0xdata.loc, after this install was done $ which python /usr/local/bi ...
- [转]Installing SharePoint 2013 on Windows Server 2012 R2
转自:http://www.avivroth.com/2013/07/09/installing-sharepoint-2013-on-windows-server-2012-r2-preview/ ...
- 安装mysql odbc遇到error 1918.errror installing ODBC driver mysql ODBC 5.3 ANSI Drive
环境:Windows server2008r2 安装mysql-connector-odbc-5.3.6-win32 报错 相信错误信息:Error 1918.errror installing OD ...
- Using Confluent’s JDBC Connector without installing the entire platform
转自:https://prefrontaldump.wordpress.com/2016/05/02/using-confluents-jdbc-connector-without-installin ...
- Cocoapods的安装报错 - Error installing pods:activesupport requires Ruby version >=2.2.2
1.打开终端 2 移除现有 Ruby 默认源 输入以下指令 $gem sources --remove https://rubygems.org/ 3.使用新的源 输入以下指令 $gem source ...
- Installing Hadoop on Mac OSX Yosemite Tutorial Part 1.
Installing Hadoop on Mac OSX Yosemite Tutorial Part 1. September 23, 2014 Marek 68 Comments Install ...
- pod install出现[!] /bin/bash -c错误,Installing Realm报错
pod install出现错误,具体错误信息如下: Installing Realm () [!] /bin/bash -c set -e sh build.sh cocoapods-setup co ...
随机推荐
- shell中${}的使用
1. 截断功能${file#*/}: 拿掉第一条/及其左边的字符串:dir1/dir2/dir3/my.file.txt${file##*/}: 拿掉最后一条/及其左边的字符串:my ...
- XShell安装(五)
Xshell就是一个远程控制Centos的软件:(用XShell比较方便,试用的都知道,界面也人性化) 详细介绍请看 百度百科 我随便百度下载了一个中文版的 给下地址 http://rj.baidu ...
- AGS Server10.1中地图文档更新如何使服务更新
一.需求背景 发布服务的mxd文档发生了更改,如何对该mxd文档映射的地图服务进行更新. 二.分析 由于在10.1中地图服务的发布采用的是msd的形式,也就是虽然在ArcMap中准备的地图文档是mxd ...
- ng-disabled的使用
1.适用范围 该指令适用于<input>, <select>,<button> 和 <textarea> 元素. 2.用法解析 ng-disabled ...
- 编译java-cef
javacef即java Chromium Embedded Framework,其功能是通过在java应用中嵌入谷歌浏览器内核Chromium. 编译java-cef的过程可参考以下文档及视频: h ...
- python基本数据类型之操作
python注释 当行注视:# 被注释内容多行注释:""" 被注释内容 """ 字符串操作 # 代表单行注释 ...
- linux安装jdk_1.8
转载自http://blog.csdn.net/ldl22847/article/details/7605650 1.下载jdk的rpm安装包,这里以jdk-8u141-linux-x64.rpm为例 ...
- Java基础—Java运行原理
Java程序运行原理 在Java中引入了虚拟机(JVM,Java Virtual Machine)的概念,即在机器和编译程序之间加入了一层抽象的虚拟的机器.虚拟机在任何平台上都提供给编译程序一个的共同 ...
- 20170401 ABAP调用CIS webservice
问题: SAP abap SRM java 调webservice 不通, CIS java 这边的webservice 可以通, WHY? key:请求头,系统框架的问题, LF:因为请求头的 ...
- re模块(Python中的正则表达式)
re模块 正则表达式本身是一种小型的.高度专业化的编程语言,而在python中,通过内嵌集成re模块,程序媛们可以直接调用来实现正则匹配.正则表达式模式被编译成一系列的字节码,然后由用C编写的匹配引擎 ...