task core
项目描述
安装
pip install .
示例调用(测试框架)
task-core-example
示例调用(从文件夹)
task-core --services-dir examples/directord/services \
--inventory-file examples/directord/inventory.yaml \
--roles-file examples/directord/roles.yaml \
--debug
示例目录执行
这是一个使用 [https://github.com/cloudnull/directord] 设置keystone实例的示例。下面的代码假设有4个节点可用,并且有一个可以通过ssh从运行bash脚本的用户连接的stack用户。
sudo dnf install python3-virtualenv git -y
virtualenv ~/test-venv
source ~/test-venv/bin/activate
git clone https://github.com/Directord/task-core
pip install directord
pushd task-core
pip install -r requirements.txt
pip install .
popd
ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ""
for H in 2 3 4 5; do
ssh-keyscan -H -t rsa 192.168.24.$H >> ~/.ssh/known_hosts
ssh-copy-id 192.168.24.$H
done
cat > ~/catalog.yaml <<EOF
directord_server:
targets:
- host: 192.168.24.2
port: 22
username: stack
directord_clients:
args:
port: 22
username: stack
targets:
- host: 192.168.24.3
- host: 192.168.24.4
- host: 192.168.24.5
EOF
directord bootstrap --catalog $HOME/catalog.yaml --catalog ~/test-venv/share/directord/tools/directord-bootstrap-catalog.yaml
sudo chmod a+w /var/run/directord.sock
cat > ~/inventory.yaml <<EOF
hosts:
standalone-1:
role: keystone
standalone-2:
role: basic
standalone-3:
role: basic
EOF
task-core \
-s task-core/examples/directord/services/ \
-i $HOME/inventory.yaml \
-r task-core/examples/directord/roles.yaml
ssh standalone-1 openstack --os-auth-url http://standalone-1:5000/v3 --os-user-domain-name default --os-username admin --os-password keystone token issue
项目详情
下载文件
下载您平台对应的文件。如果您不确定该选择哪个,请了解有关安装包的更多信息。
源代码分发
task-core-0.2.1.tar.gz (80.6 kB 查看哈希值)
构建分发
task_core-0.2.1-py3-none-any.whl (130.6 kB 查看哈希值)