Navigation Menu

Skip to content

Commit

Permalink
Dpdk helm provisioning
Browse files Browse the repository at this point in the history
Added dpdk templates for provisioning dpdk vrouter using helm charts

Change-Id: Ie118b7cf97b1dc0f63b9ebe8c6e38586680682d2
Partial-Bug: #1743610
  • Loading branch information
madhukar32 committed Feb 22, 2018
1 parent 0747e8c commit f09b661
Show file tree
Hide file tree
Showing 6 changed files with 246 additions and 39 deletions.
14 changes: 7 additions & 7 deletions contrail-analytics/values.yaml
@@ -1,12 +1,12 @@
images:
tags:
nodemgr: "docker.io/opencontrail/contrail-nodemgr:5.0.0-175-centos7-newton"
analytics_api: "docker.io/opencontrail/contrail-analytics-api:5.0.0-175-centos7-newton"
contrail_collector: "docker.io/opencontrail/contrail-analytics-collector:5.0.0-175-centos7-newton"
analytics_alarm_gen: "docker.io/opencontrail/contrail-analytics-alarm-gen:5.0.0-175-centos7-newton"
analytics_query_engine: "docker.io/opencontrail/contrail-analytics-query-engine:5.0.0-175-centos7-newton"
analytics_snmp_collector: "docker.io/opencontrail/contrail-analytics-snmp-collector:5.0.0-175-centos7-newton"
contrail_topology: "docker.io/opencontrail/contrail-analytics-topology:5.0.0-175-centos7-newton"
nodemgr: "docker.io/opencontrail/contrail-nodemgr:5.0.0-20180220070035-centos7-newton"
analytics_api: "docker.io/opencontrail/contrail-analytics-api:5.0.0-20180220070035-centos7-newton"
contrail_collector: "docker.io/opencontrail/contrail-analytics-collector:5.0.0-20180220070035-centos7-newton"
analytics_alarm_gen: "docker.io/opencontrail/contrail-analytics-alarm-gen:5.0.0-20180220070035-centos7-newton"
analytics_query_engine: "docker.io/opencontrail/contrail-analytics-query-engine:5.0.0-20180220070035-centos7-newton"
analytics_snmp_collector: "docker.io/opencontrail/contrail-analytics-snmp-collector:5.0.0-20180220070035-centos7-newton"
contrail_topology: "docker.io/opencontrail/contrail-analytics-topology:5.0.0-20180220070035-centos7-newton"
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.2.1
imagePullPolicy: "IfNotPresent"

Expand Down
20 changes: 10 additions & 10 deletions contrail-controller/values.yaml
@@ -1,15 +1,15 @@
images:
tags:
nodemgr: "docker.io/opencontrail/contrail-nodemgr:5.0.0-175-centos7-newton"
contrail_control: "docker.io/opencontrail/contrail-controller-control-control:5.0.0-175-centos7-newton"
control_dns: "docker.io/opencontrail/contrail-controller-control-dns:5.0.0-175-centos7-newton"
control_named: "docker.io/opencontrail/contrail-controller-control-named:5.0.0-175-centos7-newton"
config_api: "docker.io/opencontrail/contrail-controller-config-api:5.0.0-175-centos7-newton"
config_devicemgr: "docker.io/opencontrail/contrail-controller-config-devicemgr:5.0.0-175-centos7-newton"
config_schema_transformer: "docker.io/opencontrail/contrail-controller-config-schema:5.0.0-175-centos7-newton"
config_svcmonitor: "docker.io/opencontrail/contrail-controller-config-svcmonitor:5.0.0-175-centos7-newton"
webui_middleware: "docker.io/opencontrail/contrail-controller-webui-job:5.0.0-175-centos7-newton"
webui: "docker.io/opencontrail/contrail-controller-webui-web:5.0.0-175-centos7-newton"
nodemgr: "docker.io/opencontrail/contrail-nodemgr:5.0.0-20180220070035-centos7-newton"
contrail_control: "docker.io/opencontrail/contrail-controller-control-control:5.0.0-20180220070035-centos7-newton"
control_dns: "docker.io/opencontrail/contrail-controller-control-dns:5.0.0-20180220070035-centos7-newton"
control_named: "docker.io/opencontrail/contrail-controller-control-named:5.0.0-20180220070035-centos7-newton"
config_api: "docker.io/opencontrail/contrail-controller-config-api:5.0.0-20180220070035-centos7-newton"
config_devicemgr: "docker.io/opencontrail/contrail-controller-config-devicemgr:5.0.0-20180220070035-centos7-newton"
config_schema_transformer: "docker.io/opencontrail/contrail-controller-config-schema:5.0.0-20180220070035-centos7-newton"
config_svcmonitor: "docker.io/opencontrail/contrail-controller-config-svcmonitor:5.0.0-20180220070035-centos7-newton"
webui_middleware: "docker.io/opencontrail/contrail-controller-webui-job:5.0.0-20180220070035-centos7-newton"
webui: "docker.io/opencontrail/contrail-controller-webui-web:5.0.0-20180220070035-centos7-newton"
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.2.1
imagePullPolicy: "IfNotPresent"

Expand Down
8 changes: 4 additions & 4 deletions contrail-thirdparty/values.yaml
@@ -1,10 +1,10 @@
images:
tags:
kafka: "docker.io/opencontrail/contrail-external-kafka:5.0.0-175-centos7-newton"
cassandra: "docker.io/opencontrail/contrail-external-cassandra:5.0.0-175-centos7-newton"
kafka: "docker.io/opencontrail/contrail-external-kafka:5.0.0-20180220070035-centos7-newton"
cassandra: "docker.io/opencontrail/contrail-external-cassandra:5.0.0-20180220070035-centos7-newton"
redis: "redis:4.0.2"
zookeeper: "docker.io/opencontrail/contrail-external-zookeeper:5.0.0-175-centos7-newton"
nodemgr: "docker.io/opencontrail/contrail-nodemgr:5.0.0-175-centos7-newton"
zookeeper: "docker.io/opencontrail/contrail-external-zookeeper:5.0.0-20180220070035-centos7-newton"
nodemgr: "docker.io/opencontrail/contrail-nodemgr:5.0.0-20180220070035-centos7-newton"
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.2.1

labels:
Expand Down
192 changes: 192 additions & 0 deletions contrail-vrouter/templates/daemonset-vrouter-agent-dpdk.yaml
@@ -0,0 +1,192 @@
{{- if .Values.manifests.daemonset_dpdk }}
{{- $context := . }}
# host_os is a mandatory field
{{- $_ := required ".Values.node.host_os must be specified, valid values are ubuntu, centos" .Values.node.host_os }}
{{- $host_os := .Values.node.host_os }}
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: contrail-vrouter-agent-dpdk
spec:
template:
metadata:
labels:
{{ tuple $context "opencontrail" "contrail-vrouter-agent-dpdk" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.labels.vrouter_agent_dpdk.node_selector_key }}
operator: In
values:
- {{ .Values.labels.vrouter_agent_dpdk.node_selector_value }}
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
hostNetwork: true
hostPID: true
dnsPolicy: ClusterFirstWithHostNet
initContainers:
{{ tuple $context .Values.dependencies.vrouter_agent_dpdk nil | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
- name: contrail-init-dpdk
image: {{ .Values.images.tags.vrouter_init_dpdk | quote }}
imagePullPolicy: {{ default "" .Values.images.imagePullPolicy | quote }}
securityContext:
privileged: true
envFrom:
- configMapRef:
name: configmap-vrouter
- configMapRef:
name: configmap-vrouter-auth
volumeMounts:
- mountPath: /lib/modules
name: lib-modules
- mountPath: /var/run
name: var-run
- mountPath: /etc/os-release
name: os-release
- mountPath: /etc/lsb-release
name: lsb-release
- mountPath: {{ .Values.contrail_env.HUGE_PAGES_DIR | default "/hugepages" }}
name: hugepages
containers:
- name: contrail-vrouter-dpdk
image: {{ .Values.images.tags.vrouter_dpdk | quote }}
imagePullPolicy: {{ default "" .Values.images.imagePullPolicy | quote }}
securityContext:
privileged: true
envFrom:
- configMapRef:
name: configmap-vrouter
- configMapRef:
name: configmap-vrouter-auth
volumeMounts:
- mountPath: /etc/
name: mount-etc
- mountPath: /lib/modules
name: lib-modules
- mountPath: /var/run
name: var-run
- mountPath: /var/log/contrail
name: contrail-log
- mountPath: /etc/contrail/
name: etc-contrail-dpdk
- mountPath: /etc/os-release
name: os-release
- mountPath: /etc/lsb-release
name: lsb-release
- mountPath: {{ .Values.contrail_env.HUGE_PAGES_DIR | default "/hugepages" }}
name: hugepages
- name: contrail-dpdk-watchdog
image: {{ .Values.images.tags.dpdk_watchdog | quote }}
imagePullPolicy: {{ default "" .Values.images.imagePullPolicy | quote }}
securityContext:
privileged: true
envFrom:
- configMapRef:
name: configmap-vrouter
- configMapRef:
name: configmap-vrouter-auth
volumeMounts:
{{- if eq $host_os "centos"}}
- mountPath: /etc/sysconfig/network-scripts
name: network-scripts
{{- end }}
- mountPath: /lib/modules/
name: lib-modules
- mountPath: /var/run/
name: var-run
- name: contrail-vrouter-dpdk-agent
image: {{ .Values.images.tags.vrouter_agent | quote }}
imagePullPolicy: {{ default "" .Values.images.imagePullPolicy | quote }}
securityContext:
privileged: true
envFrom:
- configMapRef:
name: configmap-vrouter
- configMapRef:
name: configmap-vrouter-auth
volumeMounts:
- mountPath: /var/lib/contrail/
name: var-lib-contrail
- mountPath: /var/log/contrail/
name: contrail-log
- mountPath: /etc/contrail/
name: etc-contrail
- mountPath: /var/run/
name: var-run
- mountPath: {{ .Values.contrail_env.HUGE_PAGES_DIR | default "/hugepages" }}
name: hugepages
{{- if eq $host_os "centos"}}
- mountPath: /etc/sysconfig/network-scripts
name: network-scripts
{{- end }}
- name: contrail-agent-nodemgr
image: {{ .Values.images.tags.nodemgr | quote }}
imagePullPolicy: {{ default "" .Values.images.imagePullPolicy | quote }}
envFrom:
- configMapRef:
name: configmap-vrouter
- configMapRef:
name: configmap-vrouter-auth
env:
- name: NODE_TYPE
value: vrouter
- name: DOCKER_HOST
value: "unix://mnt/docker.sock"
# todo: there is type Socket in new kubernetes, it is possible to use full
# path:
# hostPath:
# path: /var/run/docker.sock and
# type: Socket
volumeMounts:
- mountPath: /mnt
name: var-run
- mountPath: /var/log/contrail/
name: contrail-log
- mountPath: /etc/contrail/
name: etc-contrail
volumes:
{{- if eq $host_os "centos"}}
- name: network-scripts
hostPath:
path: /etc/sysconfig/network-scripts
{{- end }}
- name: var-run
hostPath:
path: /var/run
- name: usr-src
hostPath:
path: /usr/src
- name: lib-modules
hostPath:
path: /lib/modules
- name: var-lib-contrail
hostPath:
path: /var/lib/contrail
- name: etc-contrail-dpdk
hostPath:
path: /etc/contrail/vrouter/dpdk
- name: etc-contrail
hostPath:
path: /etc/contrail/vrouter
- name: contrail-log
hostPath:
path: /var/log/contrail/vrouter/
- name: os-release
hostPath:
path: /usr/lib/os-release
- name: lsb-release
hostPath:
path: /etc/lsb-release
- name: mount-etc
hostPath:
path: /etc
- name: hugepages
hostPath:
path: {{ .Values.contrail_env.HUGE_PAGES_DIR | default "/hugepages" }}
{{- end }}
14 changes: 7 additions & 7 deletions contrail-vrouter/templates/daemonset-vrouter-agent-kernel.yaml
Expand Up @@ -20,10 +20,10 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.labels.vrouter_kernel.node_selector_key }}
- key: {{ .Values.labels.vrouter_agent_kernel.node_selector_key }}
operator: In
values:
- {{ .Values.labels.vrouter_kernel.node_selector_value }}
- {{ .Values.labels.vrouter_agent_kernel.node_selector_value }}
#Enable tolerations for single node setup
tolerations:
- key: node-role.kubernetes.io/master
Expand All @@ -32,7 +32,7 @@ spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
initContainers:
{{ tuple $context .Values.dependencies.vrouter_kernel nil | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
{{ tuple $context .Values.dependencies.vrouter_agent_kernel nil | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
{{- if eq $host_os "ubuntu"}}
- name: contrail-init-kernel
image: {{ .Values.images.tags.build_driver_init | quote }}
Expand Down Expand Up @@ -103,7 +103,7 @@ spec:
# type: Socket
volumeMounts:
- mountPath: /mnt
name: docker-unix-socket
name: var-run
- mountPath: /var/log/contrail/
name: contrail-log
- mountPath: /etc/contrail/
Expand All @@ -121,12 +121,12 @@ spec:
hostPath:
path: /etc/sysconfig/network-scripts
{{- end }}
- name: var-run
hostPath:
path: /var/run/
- name: var-lib-contrail
hostPath:
path: /var/lib/contrail/
- name: docker-unix-socket
hostPath:
path: /var/run
- name: etc-contrail
hostPath:
path: /etc/contrail/vrouter/
Expand Down
37 changes: 26 additions & 11 deletions contrail-vrouter/values.yaml
@@ -1,22 +1,29 @@
images:
tags:
nodemgr: "docker.io/opencontrail/contrail-nodemgr:5.0.0-175-centos7-newton"
build_driver_init: "docker.io/opencontrail/contrail-agent-build-driver-init:5.0.0-189-ubuntu16-newton"
vrouter_agent: "docker.io/opencontrail/contrail-agent-vrouter:5.0.0-175-centos7-newton"
vrouter_init_kernel: "docker.io/opencontrail/contrail-agent-vrouter-init-kernel:5.0.0-175-ubuntu16-newton"
nodemgr: "docker.io/opencontrail/contrail-nodemgr:5.0.0-20180220070035-centos7-newton"
build_driver_init: "docker.io/opencontrail/contrail-agent-build-driver-init:5.0.0-20180220070035-ubuntu16-newton"
vrouter_agent: "docker.io/opencontrail/contrail-agent-vrouter:5.0.0-20180220070035-centos7-newton"
vrouter_init_kernel: "docker.io/opencontrail/contrail-agent-vrouter-init-kernel:5.0.0-20180220070035-centos7-newton"
vrouter_dpdk: "docker.io/opencontrail/contrail-agent-vrouter-dpdk:5.0.0-20180220070035-centos7-newton"
vrouter_init_dpdk: "docker.io/opencontrail/contrail-agent-vrouter-init-kernel-dpdk:5.0.0-20180220070035-centos7-newton"
dpdk_watchdog: "docker.io/opencontrail/contrail-agent-net-watchdog:5.0.0-20180220070035-centos7-newton"
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.2.1
imagePullPolicy: "IfNotPresent"

labels:
vrouter_kernel:
node_selector_key: openstack-compute-node
node_selector_value: enabled
vrouter_nodemgr:
node_selector_key: openstack-compute-node
node_selector_value: enabled
vrouter_agent_kernel:
node_selector_key: "opencontrail.org/vrouter-kernel"
node_selector_value: "enabled"
vrouter_agent_dpdk:
node_selector_key: "opencontrail.org/vrouter-dpdk"
node_selector_value: "enabled"

dependencies:
vrouter_kernel:
vrouter_agent_kernel:
daemonset:
- contrail-config
- contrail-control
vrouter_agent_dpdk:
daemonset:
- contrail-config
- contrail-control
Expand All @@ -26,6 +33,13 @@ contrail_env:
LOG_LEVEL: SYS_NOTICE
CLOUD_ORCHESTRATOR: openstack
AAA_MODE: cloud-admin
#PHYSICAL_INTERFACE: p1p2
#CPU_CORE_MASK: "0xf"
#DPDK_UIO_DRIVER: uio_pci_generic
#HUGE_PAGES: 32000
#AGENT_MODE: dpdk
#HUGE_PAGES_DIR: /hugepages
#VROUTER_GATEWAY: 8.0.0.254

node:
host_os: ubuntu
Expand Down Expand Up @@ -60,3 +74,4 @@ endpoints:
manifests:
configmap_env: true
daemonset_kernel: true
daemonset_dpdk: false

0 comments on commit f09b661

Please sign in to comment.