conduit service mesh installation

pull/88/head
Jimmy Song 2017-12-12 23:27:14 +08:00
parent 696899f8bf
commit bbf6fa9ad6
4 changed files with 346 additions and 0 deletions

View File

@ -140,6 +140,7 @@
- [Linkerd 使用指南](usecases/linkerd-user-guide.md) - [Linkerd 使用指南](usecases/linkerd-user-guide.md)
- [Conduit](usecases/conduit.md) - [Conduit](usecases/conduit.md)
- [Condiut概览](usecases/conduit-overview.md) - [Condiut概览](usecases/conduit-overview.md)
- [安装Conduit](usecases/conduit-installation.md)
- [大数据](usecases/big-data.md) - [大数据](usecases/big-data.md)
- [Spark standalone on Kubernetes](usecases/spark-standalone-on-kubernetes.md) - [Spark standalone on Kubernetes](usecases/spark-standalone-on-kubernetes.md)
- [运行支持kubernetes原生调度的Spark程序](usecases/running-spark-with-kubernetes-native-scheduler.md) - [运行支持kubernetes原生调度的Spark程序](usecases/running-spark-with-kubernetes-native-scheduler.md)

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

View File

@ -0,0 +1,300 @@
### Namespace ###
kind: Namespace
apiVersion: v1
metadata:
name: conduit
### Controller ###
---
kind: Service
apiVersion: v1
metadata:
name: api
namespace: conduit
labels:
app: controller
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
type: ClusterIP
selector:
app: controller
ports:
- name: http
port: 8085
targetPort: 8085
---
kind: Service
apiVersion: v1
metadata:
name: proxy-api
namespace: conduit
labels:
app: controller
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
type: ClusterIP
selector:
app: controller
ports:
- name: grpc
port: 8086
targetPort: 8086
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: controller
namespace: conduit
labels:
app: controller
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
replicas: 1
template:
metadata:
labels:
app: controller
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
containers:
- name: public-api
ports:
- name: http
containerPort: 8085
- name: admin-http
containerPort: 9995
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "public-api"
- "-addr=:8085"
- "-metrics-addr=:9995"
- "-telemetry-addr=127.0.0.1:8087"
- "-tap-addr=127.0.0.1:8088"
- name: destination
ports:
- name: grpc
containerPort: 8089
- name: admin-http
containerPort: 9999
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "destination"
- "-addr=:8089"
- "-metrics-addr=:9999"
- name: proxy-api
ports:
- name: grpc
containerPort: 8086
- name: admin-http
containerPort: 9996
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "proxy-api"
- "-addr=:8086"
- "-metrics-addr=:9996"
- "-destination-addr=:8089"
- "-telemetry-addr=:8087"
- name: tap
ports:
- name: grpc
containerPort: 8088
- name: admin-http
containerPort: 9998
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "tap"
- "-addr=:8088"
- "-metrics-addr=:9998"
- name: telemetry
ports:
- name: grpc
containerPort: 8087
- name: admin-http
containerPort: 9997
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "telemetry"
- "-addr=:8087"
- "-metrics-addr=:9997"
- "-ignore-namespaces=kube-system"
- "-prometheus-url=http://prometheus:9090"
### Web ###
---
kind: Service
apiVersion: v1
metadata:
name: web
namespace: conduit
labels:
app: web
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
type: ClusterIP
selector:
app: web
ports:
- name: http
port: 8084
targetPort: 8084
- name: admin-http
port: 9994
targetPort: 9994
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: web
namespace: conduit
labels:
app: web
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
replicas: 1
template:
metadata:
labels:
app: web
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
containers:
- name: web
ports:
- name: http
containerPort: 8084
- name: admin-http
containerPort: 9994
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-web:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "-addr=:8084"
- "-metrics-addr=:9994"
- "-api-addr=api:8085"
- "-static-dir=/dist"
- "-template-dir=/templates"
- "-uuid=174a42d2-c480-4da0-8d28-8171fbb0fca3"
- "-namespace=conduit"
### Prometheus ###
---
kind: Service
apiVersion: v1
metadata:
name: prometheus
namespace: conduit
labels:
app: prometheus
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
type: ClusterIP
selector:
app: prometheus
ports:
- name: http
port: 9090
targetPort: 9090
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: prometheus
namespace: conduit
labels:
app: prometheus
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
replicas: 1
template:
metadata:
labels:
app: prometheus
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
volumes:
- name: prometheus-config
configMap:
name: prometheus-config
containers:
- name: prometheus
ports:
- name: http
containerPort: 9090
volumeMounts:
- name: prometheus-config
mountPath: /etc/prometheus
readOnly: true
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus:v1.8.1
imagePullPolicy: IfNotPresent
args:
- "-storage.local.retention=6h"
- "-storage.local.memory-chunks=500000"
- "-config.file=/etc/prometheus/prometheus.yml"
# TODO remove/replace?
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.6.2
args: ["proxy", "-p", "8001"]
---
kind: ConfigMap
apiVersion: v1
metadata:
name: prometheus-config
namespace: conduit
labels:
app: prometheus
conduit.io/plane: control
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
data:
prometheus.yml: |-
global:
scrape_interval: 10s
evaluation_interval: 10s
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'controller'
kubernetes_sd_configs:
- role: pod
namespaces:
names: ['conduit']
relabel_configs:
- source_labels: [__meta_kubernetes_pod_container_port_name]
action: keep
regex: ^admin-http$
- source_labels: [__meta_kubernetes_pod_container_name]
action: replace
target_label: job

View File

@ -0,0 +1,45 @@
# 安装Conduit
本文档指导您如何在kubernetes上安装Conduit service mesh。
## 前提条件
- kubernetes版本为1.8或以上
用到的镜像如下:
- buoyantio/kubectl:v1.6.2
- gcr.io/runconduit/controller:v0.1.0
- gcr.io/runconduit/web:v0.1.0
- prom/prometheus:v1.8.1
其中位于gcr.io的镜像我备份到了DockerHub
- jimmysong/runconduit-web:v0.1.0
- jimmysong/runconduit-controller:v0.1.0
另外两个镜像本身就可以从DockerHub上下载。
## 部署
到[release页面](https://github.com/runconduit/conduit/releases)上下载conduit的二进制文件。
使用`conduit install`命令生成了用于部署到kubernetes中yaml文件然后修改文件中的镜像仓库地址为你自己的镜像地址。
```bash
conduit install>conduit-0.1.0.yaml
# 修改完镜像地址执行
kubectl apply -f conduit-0.1.0.yaml
```
修改后的yaml文件见[conduit-0.1.0.yaml](https://github.com/rootsongjc/kubernetes-handbook/tree/master/manifests/conduit-0.1.0.yaml)。
使用`kubectl proxy`来开放外网访问conduit dashboard
```bash
kubectl proxy --address='172.20.0.113' --port=8001 --accept-hosts='^*$'
```
在浏览器中访问<http://172.20.0.113:8001/api/v1/namespaces/conduit/services/web:http/proxy/servicemesh>将看到如下页面:
![Conduit dashboard](../images/conduit-dashboard.jpg)