一个用合适的docker图片完成tosker应用程序描述的工具

TosKeriser的Python项目详细描述


toskeriser是自动完成tosca应用程序的工具。 规范,可以自动发现基于Docker的 提供 应用程序组件。

用户可以指定组成应用程序的组件,以及 通过利用一组预定义的 TOSCA types。他们 然后可以运行TosKeriser,它将使用 提供所需软件的Docker容器(组) 组件。然后,可以使用 TosKer

托斯卡里瑟第一次出现在{em1}$A.Brogi,D,Neri,L.Rinaldi,J。 soldani>;从(不完整)tosca规范到运行 应用程序,带Docker。*>;在:A.Cerone和M.Roveri(编辑)中, SEFM 2017研讨会。LNCS,斯普林格[新闻界]*

如果希望重用此工具或其中包含的源 资源库,请正确引用上述论文在你下面 可以找到bibtex参考:

@inproceedings{TosKeriser,
  author = {Antonio Brogi and Davide Neri and Luca Rinaldi and Jacopo Soldani},
  title = {{F}rom (incomplete) {TOSCA} specifications to running applications, with {D}ocker},
  editor = {A. Cerone and M. Roveri (eds.)},
  booktitle = {SEFM 2017 Workshops},
  series = {LNCS},
  publisher = {Springer},
  note = {{\em [In press]}}
}

快速指南

安装

可以使用pip安装toskeriser:

# pip install toskeriser

(它需要Python2.7或更高版本)

TosKeriser

运行示例

规范示例(不完整)可在 data/examples 文件夹。

要运行TosKeriser来完成其中一个,只需要下载 其中之一:

curl -LO https://github.com/di-unipi-socc/TosKeriser/raw/master/data/examples/thinking-app/thinking.csar

在下载的文件上运行toskeriser:

toskerise thinking.csar --policy size

完整的规范将包含在 thinking.completed.csar

使用TosKer运行完整的规范

使用托斯卡里瑟完成的规范 TosKer,它将管理 他们的实际部署。

首先,使用以下命令安装TosKer v1:

# pip install 'tosker<2'

安装后,可以运行应用程序 thinking.completed.csar使用以下命令:

tosker thinking.completed.csar create start

结果,应用程序的一个具体实例被部署,并且 可在http://localhost:8080访问。

相反,要停止并删除应用程序,请运行:

tosker thinking.completed.csar stop delete

待完成规范示例

例如,下面的应用程序有一个名为 server需要一组软件(node>;=6.2、ruby>;2和任何版本 和Alpine作为Linux发行版

...
server:
  type: tosker.nodes.Software
  requirements:
  - host:
     node_filter:
       properties:
       - supported_sw:
         - node: 6.2.x
         - ruby: 2.x
         - wget: x
       - os_distribution: alpine
  ...

在此规范上运行toskeriser之后,它将创建组件 server_container并将server组件连接到它它是 可能看到server_container拥有所有软件 是server所必需的,并且还将Alpine v3.4作为Linux发行版。

...
server:
  type: tosker.nodes.Software
  requirements:
  - host:
     node_filter:
       properties:
       - supported_sw:
         - node: 6.2.x
         - ruby: 2.x
         - wget: x
       - os_distribution: alpine
       node: server_container
  ...

server_container:
     type: tosker.nodes.Container
     properties:
       supported_sw:
         node: 6.2.0
         ash: 1.24.2
         wget: 1.24.2
         tar: 1.24.2
         bash: 4.3.42
         ruby: 2.3.1
         httpd: 1.24.2
         npm: 3.8.9
         git: 2.8.3
         erl: '2'
         unzip: 1.24.2
       os_distribution: Alpine Linux v3.4
     artifacts:
       my_image:
         file: jekyll/jekyll:3.1.6
         type: tosker.artifacts.Image
         repository: docker_hub

更多示例可以在data/examples文件夹中找到。

使用指南

toskerise FILE [COMPONENT..] [OPTIONS]
toskerise --supported_sw|-s
toskerise --version|-v
toskerise --help|-h

FILE
  TOSCA YAML file or a CSAR to be completed

COMPONENT
  a list of the components to be completed (by default all component are considered)

OPTIONS
  -i|--interactive                     active interactive mode
  --policy=top_rated|size|most_used    ordering of the images
  -q|--quiet                           active quiet mode
  -f|--force                           force the update of all containers
  --constraints=value                  constraint to give to DockerFinder
                                       (e.g. --constraints 'size<=99MB pulls>30
                                                            stars>10')
  --debug                              active debug mode

许可证

麻省理工学院许可证

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java:字符串。RTL设备语言用标志“+”格式化,数字后加符号   java GAE作为桌面应用程序(Swing)的服务提供商   java将InputStream转换为FileInputStream不适用于Apache POI   java外部Voronoi库“网格”:什么是草图和处理?   重载重写的泛型方法java   java显示组织上设置的错误。springframework。验证。jsp中的错误对象   java一些Spring模型属性没有显示在我的JSP中   java无法编译Guava 23的SimpleTimeLimiter示例   java如何更改JTree中的“根”目录名?   java如何在安卓中对相对布局产生连锁反应?   java错误:org。冬眠例外SQLGrammarException:无法提取结果集,dateAccessed是未知列   如何使用java监听JSON文件更新   由抽象封闭类创建的匿名内部类能否通过反射确定实现类?