1.安装cloudify cli(command line interface):cloudify 命令行
2.安装cloudify manager
简单的例子部署
1.加载案例的blueprint,blueprint是cloudify的核心中的核心
cfy blueprint upload blueprint.yaml -b test1
[root@localhost example_blueprint]# cfy blueprint list
Listing all blueprints...
Blueprints:
+-------+-------------+----------------+--------------------------+--------------------------+------------+----------------+------------+
| id | description | main_file_name | created_at | updated_at | visibility | tenant_name | created_by |
+-------+-------------+----------------+--------------------------+--------------------------+------------+----------------+------------+
| test1 | | blueprint.yaml | 2018-11-17 00:22:28.112 | 2018-11-17 00:22:28.112 | tenant | default_tenant | admin |
+-------+-------------+----------------+--------------------------+--------------------------+------------+----------------+------------+
Showing 1 of 1 blueprints
2加载案例所需的plugin
cfy plugin upload cloudify_plugin_example-0.1-py27-none-linux_x86_64.wgn -y example/plugin.yaml3生成bluepring的一个实例deployment
[root@localhost example_plugin]# cfy plugin list
Listing all plugins...
Plugins:
+--------------------------------------+-------------------------+-----------------+--------------+--------------------+----------------------+--------------------------+------------+----------------+------------+----------------------------------------------------------------+
| id | package_name | package_version | distribution | supported_platform | distribution_release | uploaded_at | visibility | tenant_name | created_by | yaml_url_path |
+--------------------------------------+-------------------------+-----------------+--------------+--------------------+----------------------+--------------------------+------------+----------------+------------+----------------------------------------------------------------+
| 544e6e3b-dbdf-40cc-8b06-bc554cb87c03 | cloudify-plugin-example | 0.1 | centos | linux_x86_64 | core | 2018-11-17 00:20:43.408 | tenant | default_tenant | admin | plugin:cloudify-plugin-example?version=0.1&distribution=centos |
+--------------------------------------+-------------------------+-----------------+--------------+--------------------+----------------------+--------------------------+------------+----------------+------------+----------------------------------------------------------------+
Showing 1 of 1 plugins
4执行excution在本机中部署应用
cfy deployment create -b test1 test1
[root@localhost example_blueprint]# cfy deployment list
Listing all deployments...
Deployments:
+-------+--------------+--------------------------+--------------------------+------------+----------------+------------+
| id | blueprint_id | created_at | updated_at | visibility | tenant_name | created_by |
+-------+--------------+--------------------------+--------------------------+------------+----------------+------------+
| test1 | test1 | 2018-11-17 00:23:21.462 | 2018-11-17 00:23:21.462 | tenant | default_tenant | admin |
+-------+--------------+--------------------------+--------------------------+------------+----------------+------------+
Showing 1 of 1 deployments