Skip to content

Commit 629ff2f

Browse files
authored
Merge pull request #541 from 70data/master
Fix old doc & docker-compose.yaml
2 parents 9085136 + 80672c2 commit 629ff2f

File tree

19 files changed

+23
-36
lines changed

19 files changed

+23
-36
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,3 @@ push-image:
5757
docker push $(REGISTRY_URI)/wayne-frontend:latest
5858

5959
release: build-backend-image build-frontend-image push-image
60-

README-CN.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Wayne已大规模服务于360搜索,承载了内部绝大部分业务,稳定
2323
## Features
2424

2525
- 基于 RBAC(Role based access control)的权限管理:用户通过角色与部门和项目关联,拥有部门角色允许操作部门资源,拥有项目角色允许操作项目资源,更加适合多租户场景。
26-
- 简化 Kubernetes 对象创建:提供基础 Kubernetes 对象配置文件添加方式,同时支持高级模式直接编辑 Json/Yaml文件创建 Kubernetes 对象。
26+
- 简化 Kubernetes 对象创建:提供基础 Kubernetes 对象配置文件添加方式,同时支持高级模式直接编辑 Json/Yaml 文件创建 Kubernetes 对象。
2727
- LDAP/OAuth 2.0/DB 多种登录模式支持:集成企业级 LDAP 登录及 DB 登录模式,同时还可以实现 OAuth2 登录。
2828
- 支持多集群、多租户:可以同时管理多个 Kubernetes 集群,并针对性添加特定配置,更方便的多集群、多租户管理。
2929
- 提供完整审计模块:每次操作都会有完整的审计功能,追踪用于操作历史,同时支持用户自定义 webhook。
@@ -35,7 +35,7 @@ Wayne已大规模服务于360搜索,承载了内部绝大部分业务,稳定
3535

3636
## 架构设计
3737

38-
整体采用前后端分离的方案,其中前端采用 Angular 框架进行数据交互和展示,使用Ace编辑器进行 Kubernetes 资源模版编辑。后端采用 Beego 框架做数据接口处理,使用 Client-go 与 Kubernetes 进行交互,数据使用 MySQL 存储。
38+
整体采用前后端分离的方案,其中前端采用 Angular 框架进行数据交互和展示,使用 Ace 编辑器进行 Kubernetes 资源模版编辑。后端采用 Beego 框架做数据接口处理,使用 Client-go 与 Kubernetes 进行交互,数据使用 MySQL 存储。
3939

4040
![架构图](https://360yun.org/wayne/images/architecture.png)
4141

@@ -46,12 +46,11 @@ Wayne已大规模服务于360搜索,承载了内部绝大部分业务,稳定
4646

4747
## 项目依赖
4848

49-
- Golang 1.12+([installation manual](https://golang.org/dl/))
49+
- Golang 1.12+ ([installation manual](https://golang.org/dl/))
5050
- Docker 17.05+ ([installation manual](https://docs.docker.com/install))
51-
- Bee ([installation manual](https://github.com/wilhelmguo/bee)) (请务必使用链接版本,不要使用 beego 官方版本,存在一些定制)
52-
- Node.js 8+ and npm 5+ ([installation with nvm](https://github.com/creationix/nvm#usage))
53-
- MySQL 5.6+ (Wayne 主要数据都存在 MySQL 中)
54-
- RabbitMQ (可选,如需扩展审计功能,例如操作审计和 Webhooks 等,则需部署)
51+
- Bee ([installation manual](https://github.com/beego/bee))
52+
- Node.js v11+ 和 npm 6.5+ ([installation with nvm](https://github.com/creationix/nvm#usage))
53+
- MySQL 5.6+ (Wayne 主要数据都存在 MySQL 中)
5554

5655
## 快速启动
5756

@@ -71,8 +70,7 @@ $ docker-compose -f ./hack/docker-compose/docker-compose.yaml up
7170

7271
通过上述命令,您可以从通过 http://127.0.0.1:4200 访问本地 Wayne, 默认管理员账号 admin:admin
7372

74-
> 注意:项目启动后还需要配置集群和Namespace等信息才可正常使用。详见 [集群配置](https://360yun.org/wayne/admin/cluster.html)
75-
73+
> 注意:项目启动后还需要配置集群和 Namespace 等信息才可正常使用。详见 [集群配置](https://360yun.org/wayne/admin/cluster.html)
7674
7775
## 文档
7876

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ The whole system adopts the separation of front and back ends, in which the fron
4747

4848
- Golang 1.12+ ([installation manual](https://golang.org/dl/))
4949
- Docker 17.05+ ([installation manual](https://docs.docker.com/install))
50-
- Bee ([installation manual](https://github.com/wilhelmguo/bee)) (Be sure to use the link version, don't use the official version of beego, there are some customizations.)
51-
- Node.js 8+ and npm 5+ ([installation with nvm](https://github.com/creationix/nvm#usage))
50+
- Bee ([installation manual](https://github.com/beego/bee))
51+
- Node.js v11+ and npm 6.5+ ([installation with nvm](https://github.com/creationix/nvm#usage))
5252
- MySQL 5.6+ (Most of the data is in MySQL.)
53-
- RabbitMQ (Optionally, you need to deploy if you need to extend auditing features such as operational auditing and Webhooks.)
5453

5554
## Quickly Start
5655

@@ -72,7 +71,6 @@ With the above command, you can access the local Wayne from http://127.0.0.1:420
7271

7372
> Note: After Wayne is started, you need to configure information such as cluster and Namespace for normal use. See details [Cluster Configuration](https://360yun.org/wayne/admin/cluster.html)
7473
75-
7674
## Document
7775

7876
- Refer [Wiki](https://360yun.org/wayne/)

hack/build/backend/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ COPY go.sum /go/src/github.com/Qihoo360/wayne
1212
COPY src/backend /go/src/github.com/Qihoo360/wayne/src/backend
1313

1414
RUN export GO111MODULE=on && \
15+
export GOPROXY=https://mirrors.aliyun.com/goproxy/ && \
1516
cd /go/src/github.com/Qihoo360/wayne/src/backend && \
1617
bee generate docs && \
1718
bee pack -o /_build

hack/build/base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ FROM centos:7
22

33
ADD https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/bin/linux/amd64/aws-iam-authenticator /usr/bin/aws-iam-authenticator
44

5-
RUN chmod +x /usr/bin/aws-iam-authenticator
5+
RUN chmod +x /usr/bin/aws-iam-authenticator

hack/build/ui/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ COPY src/frontend/package.json /workspace
77
COPY src/frontend/package-lock.json /workspace
88

99
RUN npm install --registry=https://registry.npm.taobao.org
10-

hack/dev/webhook/echo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ def do_POST(self):
1818

1919
Handler = GetHandler
2020
httpd = SocketServer.TCPServer(("", PORT), Handler)
21-
httpd.serve_forever()
21+
httpd.serve_forever()

hack/docker-compose/conf/app.conf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ EnableRobin = false
5454
EnableApiKeys = true
5555

5656
# Bus
57+
EnableWebhook = true
5758
BusEnable = true
58-
BusRabbitMQURL = "amqp://guest:guest@rabbitmq:5672"
5959

6060
# Webhook
6161
EnableWebhook = true
@@ -70,8 +70,8 @@ AppUrl = ""
7070

7171
# oauth2
7272
[auth.oauth2]
73-
redirect_url = "https://www.wayne.cloud"
7473
enabled = false
74+
redirect_url = "https://www.wayne.cloud"
7575
client_id = client
7676
client_secret = secret
7777
auth_url = https://example.com/oauth2/v1/authorize
@@ -92,4 +92,3 @@ ldap_filter =
9292
ldap_uid = cn
9393
ldap_scope = 2
9494
ldap_connection_timeout = 30
95-

hack/docker-compose/conf/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
window.CONFIG = {
2-
URL: 'http://localhostip:8080',
2+
URL: 'http://yourip:8080',
33
RAVEN: false,
44
RAVEN_DSN: 'RAVEN_DSN'
55
};

hack/docker-compose/docker-compose.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
- "3306:3306"
1515

1616
wayne-backend:
17-
image: 360cloud/wayne-backend:v1.8.4-16-gf3a7366
17+
image: 360cloud/wayne-backend:latest
1818
command: /opt/wayne/backend
1919
environment:
2020
GOPATH: "/go"
@@ -29,7 +29,7 @@ services:
2929
- "8080:8080"
3030

3131
wayne-frontend:
32-
image: 360cloud/wayne-frontend:latest
32+
image: 360cloud/wayne-backend:latest
3333
volumes:
3434
- ./conf/config.js:/usr/local/openresty/nginx/html/config.js
3535
depends_on:
@@ -39,5 +39,3 @@ services:
3939
- default
4040
ports:
4141
- "4200:80"
42-
43-

src/backend/cmd/apiserver/apiserver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package apiserver
22

3+
//noinspection ALL
34
import (
45
"github.com/astaxie/beego"
56
"github.com/spf13/cobra"

src/backend/cmd/root.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package cmd
22

33
import (
4+
"github.com/astaxie/beego"
5+
46
"github.com/Qihoo360/wayne/src/backend/initial"
57
_ "github.com/Qihoo360/wayne/src/backend/routers"
68
"github.com/Qihoo360/wayne/src/backend/workers/webhook"
7-
"github.com/astaxie/beego"
89
)
910

10-
1111
func Run() {
1212

1313
// MySQL
@@ -32,7 +32,6 @@ func Run() {
3232

3333
webhook.RegisterHookHandler()
3434

35-
3635
// init kube labels
3736
initial.InitKubeLabel()
3837

src/backend/cmd/worker/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package worker
22

3+
//noinspection ALL
34
import (
45
"errors"
56
"fmt"
@@ -137,5 +138,4 @@ func recoverableWorker(workerSet map[*workers.Worker]workers.Worker, workerType
137138

138139
}()
139140
workerSet[&worker] = worker
140-
141141
}

src/backend/database/generatedata/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ func main() {
1111
for _, data := range initial.InitialData {
1212
fmt.Println(data)
1313
}
14-
1514
}

src/backend/database/migrations/v1.1/ddl.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ CREATE TABLE `ingress_template`
2929
`deleted` bool NOT NULL DEFAULT false
3030
) ENGINE=InnoDB;
3131

32-
3332
-- Indexes
3433

3534
ALTER TABLE `ingress`
3635
ADD INDEX `ingress_app_id`(`app_id`);
3736
ALTER TABLE `ingress`
3837
ADD INDEX `ingress_order_id`(`order_id`);
3938
ALTER TABLE `ingress_template`
40-
ADD INDEX `ingress_template_ingress_id`(`ingress_id`);
39+
ADD INDEX `ingress_template_ingress_id`(`ingress_id`);

src/backend/database/migrations/v1.3/ddl.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ CREATE TABLE IF NOT EXISTS `hpa_template` (
2424
`user` varchar(128) NOT NULL DEFAULT '' ,
2525
`deleted` bool NOT NULL DEFAULT false
2626
) ENGINE=InnoDB;
27-
CREATE INDEX `hpa_template_hpa_id` ON `hpa_template` (`hpa_id`);
27+
CREATE INDEX `hpa_template_hpa_id` ON `hpa_template` (`hpa_id`);

src/backend/initial/bus.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ func InitBus() {
1313
panic(err)
1414
}
1515
}
16-
1716
}

src/backend/initial/rsa_key.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ func InitRsaKey() {
2222
panic(err)
2323
}
2424
apikey.RsaPublicKey = publicKey
25-
2625
}
2726

2827
func readKey(key string) []byte {

src/backend/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"github.com/Qihoo360/wayne/src/backend/cmd"
55
)
66

7-
87
func main() {
98
cmd.Run()
109
}

0 commit comments

Comments
 (0)