没有项目描述
enos-kubernetes的Python项目详细描述
在不同的提供者上部署kubernetes。部署用于 评估/实验目的(非生产)。
此项目使用的幕后操作:
- kubespray(https://github.com/kubernetes-sigs/kubespray):它使用体面的 默认值,但这应该可以合理地自定义(通过角色和 配置文件中的变量)
- 框架部分的enoslib(https://gitlab.inria.fr/discovery/enoslib)。
命令行概述
Usage: ek [OPTIONS] COMMAND [ARGS]... Options: --help Show this message and exit. Commands: backup Backup the deployed environment build Preconfigure a machine with all the... deploy Claim resources from a PROVIDER and configure... destroy Destroy the deployed environment g5k Claim resources on Grid'5000(frontend). hints Give some hints on the deployment inventory Generate the Ansible inventory [after g5k or... post_install Post install the deployement prepare Configure available resources [after deploy,... reset Resets Kubernetes (see kspray doc) vagrant Claim resources on vagrant (localhost).
使用概述
安装项目:
virtualenv -p python3 venv source venv/bin/activate pip install enos-kubernetes
配置grid5000 rest api访问:
echo ' username: MYLOGIN password: MYPASSWORD ' > ~/.python-grid5000.yaml
在以下位置获取示例配置文件:
wget https://gitlab.inria.fr/msimonin/enos-kubernetes/raw/master/conf.yaml
部署在G5K上:
ek deploy g5k
使用虚拟机在G5K上部署:
ek deploy vmong5k
在G5K上建立基础图像:
ek build g5k
使用另一个群集在vmong5k上构建基础映像:
ek build vmong5k --cluster=chetemi
这也可以从python直接使用提供的api:
# pseudo-code to deploy to g5k from enos_kubernetes import tasks ... tasks.g5k(...) tasks.inventory(...) tasks.prepare(...) ...