This commit is contained in:
light 2018-03-15 10:59:13 +08:00
parent 72ca6535db
commit 0810776df9
4 changed files with 69 additions and 0 deletions

1
git/command.md Normal file
View File

@ -0,0 +1 @@
git submodule update --init --recursive

38
openstack/install.md Normal file
View File

@ -0,0 +1,38 @@
# install openstack
- ubuntu 16.04, openstack queen
## keystone
``` bash
docker pull mysql
docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql
docker exec -i -t id /bin/bash
/# mysql -u root -p
> CREATE DATABASE keystone;
> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '123456';
> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '123456';
> exit
/# exit
sudo apt install keystone apache2 libapache2-mod-wsgi
sudo nano /etc/keystone/keystone.conf
# connection = mysql+pymysql://keystone:123456@127.0.0.1/keystone
# provider = fernet
sudo su -s /bin/sh -c "keystone-manage db_sync" keystone
sudo keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
sudo keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
sudo keystone-manage bootstrap --bootstrap-password 123456 \
--bootstrap-admin-url http://127.0.0.1:5000/v3/ \
--bootstrap-internal-url http://127.0.0.1:5000/v3/ \
--bootstrap-public-url http://127.0.0.1:5000/v3/ \
--bootstrap-region-id RegionOne
docker pull httpd
mkdir -p ~/apache/www ~/apache/logs ~/apache/conf
docker run -p 80:80 -v $PWD/www/:/usr/local/apache2/htdocs/ -v $PWD/conf/httpd.conf:/usr/local/apache2/conf/httpd.conf -v $PWD/logs/:/usr/local/apache2/logs/ -d httpd
```

View File

@ -0,0 +1,21 @@
# tornado 5.0 更新
- 官方更新文档 http://www.tornadoweb.org/en/stable/releases/v5.0.0.html
## highlight
- 融合了python原生协程库 asyncio
- 仅支持 2.7.9 + 和 3.4+
- tornado 6.0 将只会支持3.5+
tips 尽快转向python3.5 速度和一些新特性用的很舒服
## note
- 新特性只支持3.5.2+ 由于asyncio的迭代协议变化所以3.5.0,3.5.1不支持新特性
- 不再支持 trollius 转python3.5.2+吧)
- tornado.concurrent.Future 使用的是 asyncio.Future (for 3.5.2+)
- io_loop 从好多好多好多好多函数方法参数里移除了所以很多库都有兼容问题比如tornado-redis更新文档里搜索 io_loop 发现大约17个类移除了这个参数意味这要使用tornado5.0,项目的很多基础组件都得打个难看的补丁)
- 其他的细节自己看文档去吧,我大概就看了这些

View File

@ -81,3 +81,12 @@ case "$1" in
esac esac
``` ```
## docker
``` bash
mkdir /db/redis/
docker run -p 6379:6379 -v /db/redis/:/data -d redis redis-server --appendonly yes
```