自动热模板生成
项目描述
OpenStack编排项目Heat实现了一个编排引擎,用于根据模板启动多个复合云应用。Heat模板描述了基础设施资源(服务器、网络、浮动IP等)及其之间的关系,允许Heat按正确顺序部署资源并管理整个基础设施生命周期。
flame是一个独立的工具,可以从现有的基础设施生成HOT Heat模板。它支持Nova(密钥对和服务器)、Cinder(卷)和Neutron(路由器、网络、子网、安全组和浮动IP)资源。
flame的工作方式如下:使用提供的凭据(用户名、项目名称、密码或auth_token、认证URL),工具将列出项目中部署的支持资源,并将生成相应的、高度定制的HOT模板。
安装
首先,克隆存储库并进入存储库目录
git clone https://github.com/openstack/flame.git cd flame
然后只需运行
python setup.py install
用法
要使用flame的命令行界面
usage: flame [-h] [--debug] [--generate-stack-data] [--include-constraints] [--no-threads] [--prefetch] [--exclude-keypairs] [--extract-ports] [--exclude-secgroups] [--exclude-servers] [--exclude-volumes] [--os-cloud <name>] [--os-auth-type <name>] [--os-auth-url OS_AUTH_URL] [--os-system-scope OS_SYSTEM_SCOPE] [--os-domain-id OS_DOMAIN_ID] [--os-domain-name OS_DOMAIN_NAME] [--os-project-id OS_PROJECT_ID] [--os-project-name OS_PROJECT_NAME] [--os-project-domain-id OS_PROJECT_DOMAIN_ID] [--os-project-domain-name OS_PROJECT_DOMAIN_NAME] [--os-trust-id OS_TRUST_ID] [--os-default-domain-id OS_DEFAULT_DOMAIN_ID] [--os-default-domain-name OS_DEFAULT_DOMAIN_NAME] [--os-user-id OS_USER_ID] [--os-username OS_USERNAME] [--os-user-domain-id OS_USER_DOMAIN_ID] [--os-user-domain-name OS_USER_DOMAIN_NAME] [--os-password OS_PASSWORD] [--insecure] [--os-cacert <ca-certificate>] [--os-cert <certificate>] [--os-key <key>] [--timeout <seconds>] [--collect-timing] [--os-service-type <name>] [--os-service-name <name>] [--os-interface <name>] [--os-region-name <name>] [--os-endpoint-override <name>] [--os-api-version <name>] Heat template and data file generator optional arguments: -h, --help show this help message and exit --debug set debuging log level --generate-stack-data In addition to template, generate Heat stack data file. --include-constraints Export in template custom constraints --no-threads Deactivate threads for api calls, (usefull for (i)pdb debugging. --prefetch Prefetch all API calls (works only without --no- threads --exclude-keypairs Do not export in template key pair resources --extract-ports Export the tenant network ports --exclude-secgroups Do not export in template security group resources --exclude-servers Do not export in template server resources --exclude-volumes Do not export in template volume resources --os-cloud <name> Named cloud to connect to --os-auth-type <name>, --os-auth-plugin <name> Authentication type to use Authentication Options: Options specific to the password plugin. --os-auth-url OS_AUTH_URL Authentication URL --os-system-scope OS_SYSTEM_SCOPE Scope for system operations --os-domain-id OS_DOMAIN_ID Domain ID to scope to --os-domain-name OS_DOMAIN_NAME Domain name to scope to --os-project-id OS_PROJECT_ID, --os-tenant-id OS_PROJECT_ID Project ID to scope to --os-project-name OS_PROJECT_NAME, --os-tenant-name OS_PROJECT_NAME Project name to scope to --os-project-domain-id OS_PROJECT_DOMAIN_ID Domain ID containing project --os-project-domain-name OS_PROJECT_DOMAIN_NAME Domain name containing project --os-trust-id OS_TRUST_ID Trust ID --os-default-domain-id OS_DEFAULT_DOMAIN_ID Optional domain ID to use with v3 and v2 parameters. It will be used for both the user and project domain in v3 and ignored in v2 authentication. --os-default-domain-name OS_DEFAULT_DOMAIN_NAME Optional domain name to use with v3 API and v2 parameters. It will be used for both the user and project domain in v3 and ignored in v2 authentication. --os-user-id OS_USER_ID User id --os-username OS_USERNAME, --os-user-name OS_USERNAME Username --os-user-domain-id OS_USER_DOMAIN_ID User's domain id --os-user-domain-name OS_USER_DOMAIN_NAME User's domain name --os-password OS_PASSWORD User's password API Connection Options: Options controlling the HTTP API Connections --insecure Explicitly allow client to perform "insecure" TLS (https) requests. The server's certificate will not be verified against any certificate authorities. This option should be used with caution. --os-cacert <ca-certificate> Specify a CA bundle file to use in verifying a TLS (https) server certificate. Defaults to env[OS_CACERT]. --os-cert <certificate> Defaults to env[OS_CERT]. --os-key <key> Defaults to env[OS_KEY]. --timeout <seconds> Set request timeout (in seconds). --collect-timing Collect per-API call timing information. Service Options: Options controlling the specialization of the API Connection from information found in the catalog --os-service-type <name> Service type to request from the catalog --os-service-name <name> Service name to request from the catalog --os-interface <name> API Interface to use [public, internal, admin] --os-region-name <name> Region of the cloud to use --os-endpoint-override <name> Endpoint to use instead of the endpoint in the catalog --os-api-version <name> Which version of the service API to use
用法示例
要使用Flame,您可以将您的OpenStack凭据作为参数提供
$ flame --os-username 'user_name' \ --os-password 'password' \ --os-project-name 'project_name' \ --os-auth-url 'http://<Keystone_host>:5000/v2.0'
或者,您可以源OpenStack RC文件,并使用Flame而不需要参数。
与身份服务建立双向SSL连接
$flame --os-username 'user_name' \ --os-password 'password' \ --os-project-name 'project_name' \ --os-auth_url http://<Keystone_host>:5000/v2.0 \ --os-cert <path/to/certificate> \ --os-key <path/to/key>
Flame可以通过导出OS_AUTH_TOKEN变量和–os-auth-type ‘token’
参数(通过keystone token-get获取令牌)使用登录和密码对或keystone令牌使用。
$ flame --os-auth-type 'token' \ --os-token 'token_id' \ --os-auth-url 'http://<Keystone_host>:5000/v2.0'
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源分布
python-flameclient-1.0.0.tar.gz (54.5 kB 查看哈希值)
构建分布
关闭
哈希值 for python_flameclient-1.0.0-py2.py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | dd74fd859be3c2ad62c5409cd2e65d8404865cf927671679feb12cf93d435690 |
|
MD5 | 7edb4ceb18109c1d67b8a227d1f31454 |
|
BLAKE2b-256 | 7c768cca79c67e562aa4a4382abfe439fd4e97c540025f97f0b26ef38b64aa26 |