Cloud Foundry-如何检索跨组织运行的每个应用程序的工件版本? [英] Cloud foundry - How to retrieve version of artifact of every app running across Orgs?

查看:85
本文介绍了Cloud Foundry-如何检索跨组织运行的每个应用程序的工件版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在PCF平台中,每个组织中都有多个组织和多个空格。

In PCF platform, We have multiple Orgs and multiple Spaces within each Org.

每个空间都部署了多个应用程序,其中包含提及工件版本的清单文件。例如:如果您推动,一个应用程序( some-api )随以下清单文件一起部署,该清单文件具有工件版本( 0.0.1 )。

Each space has multiple apps deployed with manifest file mentioning the artifact version. For example: If you push an app(some-api) is deployed with below manifest file that has artifact version(0.0.1).

---
applications:
- name: some-api
  instances: 1
  memory: 1G
  buildpack: java_buildpack_offline
  path: target/artifact.jar
  routes:
  - route: some.router.com
  services:
  - abc
  - def
  env:
    ARTIFACT_VERSION: 0.0.1






目标是在整个组织中拥有一个 app toartifact版本的仪表板。处于运行状态的应用程序


Goal is to have a dashboard of app to artifact version across Orgs. App that is in Running state

1)作为工件版本存储为应用程序的环境变量,应用程序的 amdst push ,跨组织/空间,是否可以检索每个应用程序的工件版本?

1) As artifact version is stored as environment variable of an app, amidst push of an app, across Orgs/spaces, Is it possible to retrieve artifact version of each app?

2)如果否,那么存储在PCF中运行的每个应用程序的工件版本的更好方法是什么?为了检索组织/空间中处于 Running 状态的任何应用的工件版本

2) If no, what is the better approach to store artifact version of every app running in PCF? in order to retrieve the artifact version of any app in Running state across Orgs/spaces

3)显示浏览器仪表板中应用程序工件版本的列表。 PCF平台是否提供任何工具(例如 firehouse )来提供指标仪表板

3) To show the list of app's artifact versions in browser dashboard. Does PCF platform provide any tool(like firehouse) to provide a dashboard of metrics available in PCF?

推荐答案

您可以构建具有所需功能的自定义应用程序(包含所有正在运行的应用程序和ARTIFACT_VERSION值的仪表板),该应用程序将使用 Cloud Foundry API

You can build custom app with requested functionality (dashboard with all running apps and ARTIFACT_VERSION value) which will use Cloud Foundry API.

还有CLI版本 cf env doc )来快速检查CLI。

There is also CLI version cf env (doc) for quick checking in CLI.

更新:

显然,您想使用事件流,而不是定期拉动应用环境状态。在这种情况下,请使用Firehouse并注意登台完成事件,该事件将触发该应用程序的 getEnvValue(ARTIFACT_VERSION)操作分期完成事件。

Apparently, you want to use event stream and not regular pulling of the app env state. In that case use Firehouse and watch for Staging Complete events, which will trigger getEnvValue(ARTIFACT_VERSION) action for the app with that Staging Complete event.

这篇关于Cloud Foundry-如何检索跨组织运行的每个应用程序的工件版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆