Spinnaker UI

Spinnaker 的管理界面。(Management UI for Spinnaker)

Github stars Tracking Chart

Spinnaker UI

先决条件

确保系统中已经安装了 node 和 yarn。每个版本的最低版本都在 package.json 中列出。

快速入门

运行下面的命令(在 deck 目录下)来获取 deck 中安装的所有依赖关系并启动服务器。

  • yarn
  • yarn start

应用程序将在 localhost:9000 上启动。

环境变量

环境变量可以用来配置应用程序的行为。下面列出了这些变量及其可能的值:

  • AUTH 启用/禁用身份验证(默认为禁用,通过设置 AUTH=enabled 启用)。
  • TIMEZONE 设置默认的时区(默认为 'America/Los_Angeles' -- 参见 http://momentjs.com/timezone/docs/#/data-utilities/ 获取选项)。
  • DECK_CERT 启用 SSL(设置为 cert 文件的完全限定路径,DECK_KEY 必须设置为 key 文件的完全限定路径)。

以下外部资源可以通过环境变量来指定:

API_HOST 覆盖默认的 Spinnaker API 主机。
AUTH_ENABLED 决定了 Deck 是否会尝试通过 Gate 验证用户。

例如,API_HOST=http://spinnaker.prod.netflix.net yarn start 将以API_HOST=http://spinnaker.prod.netflix.net 作为 API 主机运行 Deck。

测试

要在应用程序中运行测试,请运行 yarn test。

在本地开发东西?你可能也想在本地运行gate(它在 8084 端口上运行)。Gate 是承载 spinnaker REST API 的服务。然后像这样运行 deck。

API_HOST=http://localhost:8084 yarn start

构建和部署

要构建应用程序,运行 yarn build。建成的应用程序存放在 build/.NET 中。

惯例

这是一项正在进行中的工作,但请尽量遵循这里的惯例

自定义用户界面

这当然是可行的--我们正在对我们的构建流程进行一些重大的改变,这应该会让它变得更容易。现在,你可以看看所有的模块,了解我们如何在内部定制 Deck。不过,随着我们找出更好的、更干净的钩子和集成点,预计很多东西都会改变。如果你需要一个还不存在的集成点,我们很乐意按照现有的惯例提供新的集成点(或接受拉动请求)。

加入我们

有兴趣分享对 Spinnaker 用户界面的反馈或对 Deck 的贡献吗?请加入我们的Spinnaker UI SIG


(First version translated and edited by vz on 2020.12.19)

Overview

Name With Ownerspinnaker/deck
Primary LanguageTypeScript
Program languageCSS (Language Count: 8)
PlatformDocker, Linux
License:Apache License 2.0
Release Count3004
Last Release Namev3.16.0 (Posted on )
First Release Name0.1 (Posted on 2014-09-06 23:54:23)
Created At2014-07-17 18:51:00
Pushed At2024-02-01 23:36:04
Last Commit At2024-02-01 17:56:21
Stargazers Count298
Watchers Count79
Fork Count899
Commits Count15k
Has Issues Enabled
Issues Count0
Issue Open Count0
Pull Requests Count9045
Pull Requests Open Count12
Pull Requests Close Count637
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Spinnaker UI

Branch Build

Prerequisites

Make sure that node and yarn are installed on your system.
The minimum versions for each are listed in package.json.

Quick Start

Run the following commands (in the deck directory) to get all dependencies installed in deck and to start the server:

  • yarn
  • yarn modules
  • yarn start

The app will start up on localhost:9000.

When editing core or any other cloud provider package, please run the following in that folder

  • yarn dev

If your local dev setup ends up in a corrupt state with missing npm modules, please run yarn fixup from deck and that
should reset your state.

Environment variables

Environment variables can be used to configure application behavior. The following lists those variables and their possible values:

  • AUTH enable/disable authentication (default is disabled, enable by setting AUTH=enabled).
  • TIMEZONE set the default timezone (default is 'America/Los_Angeles' - see http://momentjs.com/timezone/docs/#/data-utilities/ for options)
  • DECK_CERT enable SSL (set to the fully qualified path to cert file, and DECK_KEY must be set to the fully qualified path to the key file)

The following external resources can be specified with environment variables:

  • API_HOST overrides the default Spinnaker API host.
  • AUTH_ENABLED determines whether Deck will attempt to authenticate users via Gate.

For example, API_HOST=http://spinnaker.prod.netflix.net yarn start will run Deck with http://spinnaker.prod.netflix.net as the API host.

Development

Deck has a combination of Angular and React, but is moving to React only. New changes made to the Deck project should use React wherever possible.

Testing

To run the tests within the application, run yarn test.

Developing things locally? You may want to run gate locally (which runs on port 8084) as well.
Gate is the service that hosts the spinnaker REST API.
Then run deck like this:

API_HOST=http://localhost:8084 yarn start

Building & Deploying

To build the application, run yarn modules && yarn build.
The built application lives in build/.

Graphql

the core package is using graphql queries and mutation to interact with the backend (currently, only the managed components).
To generate the TS types and the Apollo hooks, run yarn graphql:generate from core.

Conventions

It's a work in progress, but please try to follow the conventions here.

Customizing the UI

It's certainly doable - we're in the middle of some significant changes to our build process, which should make it easier.
For now, you can look at the all modules to
get an idea how we are customizing Deck internally. Expect a lot of this to change, though, as we figure out better, cleaner
hooks and integration points. And we're happy to provide new integration points (or accept pull requests) following
those existing conventions if you need an integration point that doesn't already exist.

Join Us

Interested in sharing feedback on Spinnaker's UI or contributing to Deck?
Please join us at the Spinnaker UI SIG!

To the top