aboutsummaryrefslogtreecommitdiffstats
path: root/docs/testing/user/userguide/east-west-benchmarking/Configurations/Kubernetes/TRex-pod/userspace-trex-pod-2-interfaces-VPP.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/testing/user/userguide/east-west-benchmarking/Configurations/Kubernetes/TRex-pod/userspace-trex-pod-2-interfaces-VPP.yaml')
-rw-r--r--docs/testing/user/userguide/east-west-benchmarking/Configurations/Kubernetes/TRex-pod/userspace-trex-pod-2-interfaces-VPP.yaml64
1 files changed, 64 insertions, 0 deletions
diff --git a/docs/testing/user/userguide/east-west-benchmarking/Configurations/Kubernetes/TRex-pod/userspace-trex-pod-2-interfaces-VPP.yaml b/docs/testing/user/userguide/east-west-benchmarking/Configurations/Kubernetes/TRex-pod/userspace-trex-pod-2-interfaces-VPP.yaml
new file mode 100644
index 00000000..418d3ede
--- /dev/null
+++ b/docs/testing/user/userguide/east-west-benchmarking/Configurations/Kubernetes/TRex-pod/userspace-trex-pod-2-interfaces-VPP.yaml
@@ -0,0 +1,64 @@
+# Copyright 2022 Anuket, Intel Corporation, and The Linux Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: v1
+kind: Pod
+metadata:
+ name: userspace-trex-pod-t1-p1
+ annotations:
+ k8s.v1.cni.cncf.io/networks: userspace-vpp-net, userspace-vpp-net
+spec:
+ containers:
+ - name: vpp-vhost
+ image: trex:latest
+ imagePullPolicy: Never
+ securityContext:
+ privileged: true
+ volumeMounts:
+ - mountPath: /etc/podnetinfo
+ name: podinfo
+ readOnly: false
+ - mountPath: /usrspcni/
+ name: shared-dir
+ - mountPath: /dev/hugepages
+ name: hugepage
+ resources:
+ requests:
+ cpu: "6000m"
+ memory: "4000Mi"
+ hugepages-1Gi: 4Gi
+ limits:
+ cpu: "6000m"
+ memory: "4000Mi"
+ hugepages-1Gi: 4Gi
+ nodeSelector:
+ vswitch: ovs
+ volumes:
+ - name: podinfo
+ downwardAPI:
+ items:
+ - path: "labels"
+ fieldRef:
+ fieldPath: metadata.labels
+ - path: "annotations"
+ fieldRef:
+ fieldPath: metadata.annotations
+ - name: shared-dir
+ hostPath:
+ path: /var/lib/cni/usrspcni/data/
+ - name: hugepage
+ emptyDir:
+ medium: HugePages
+
String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
heat_template_version: 2016-10-14
description: 'All Nodes Config for Puppet'

parameters:
  cloud_name_external:
    type: string
  cloud_name_internal_api:
    type: string
  cloud_name_storage:
    type: string
  cloud_name_storage_mgmt:
    type: string
  cloud_name_ctlplane:
    type: string
  # FIXME(shardy) this can be comma_delimited_list when
  # https://bugs.launchpad.net/heat/+bug/1617019 is fixed
  enabled_services:
    type: string
  controller_ips:
    type: comma_delimited_list
  logging_groups:
    type: json
  logging_sources:
    type: json
  service_ips:
    type: json
  service_node_names:
    type: json
  short_service_node_names:
    type: json
  controller_names:
    type: comma_delimited_list
  memcache_node_ips:
    type: comma_delimited_list
  NetVipMap:
    type: json
  RedisVirtualIP:
    type: string
    default: ''
  ServiceNetMap:
    type: json
  DeployIdentifier:
    type: string
    default: ''
    description: >
      Setting this to a unique value will re-run any deployment tasks which
      perform configuration on a Heat stack-update.
  UpdateIdentifier:
    type: string
    description: >
      Setting to a previously unused value during stack-update will trigger
      package update on all nodes
  StackAction:
    type: string
    description: >
      Heat action on performed top-level stack.
    constraints:
    - allowed_values: ['CREATE', 'UPDATE']
  # NOTE(jaosorior): This is being set as IPA as it's the first
  # CA we'll actually be testing out. But we can change this if
  # people request it.
  CertmongerCA:
    type: string
    default: 'IPA'
  EnableInternalTLS:
    type: boolean
    default: false

resources:

  allNodesConfigImpl:
    type: OS::Heat::StructuredConfig
    properties:
      group: os-apply-config
      config:
        hiera:
          datafiles:
            bootstrap_node:
              mapped_data:
                bootstrap_nodeid: {get_input: bootstrap_nodeid}
                bootstrap_nodeid_ip: {get_input: bootstrap_nodeid_ip}
            all_nodes:
              mapped_data:
                map_merge:
                  - tripleo::profile::base::logging::fluentd::fluentd_sources: {get_param: logging_sources}
                  - tripleo::profile::base::logging::fluentd::fluentd_groups: {get_param: logging_groups}
                  - enabled_services: {get_param: enabled_services}
                  # This writes out a mapping of service_name_enabled: 'true'
                  # For any services not enabled, hiera foo_enabled will
                  # return nil, as it's undefined
                  - map_merge:
                      repeat:
                        template:
                          # Note this must be string 'true' due to
                          # https://bugs.launchpad.net/heat/+bug/1617203
                          SERVICE_enabled: 'true'
                        for_each:
                          SERVICE:
                            str_split: [',', {get_param: enabled_services}]
                  # Dynamically generate per-service network data
                  # This works as follows (outer->inner functions)
                  # yaql - filters services where no mapping exists in ServiceNetMap
                  #   map_replace: substitute e.g heat_api_network with network name from ServiceNetMap
                  #     map_merge/repeat: generate a per-service mapping
                  - yaql:
                      # This filters any entries where the value hasn't been substituted for
                      # a list, e.g it's still $service_network.  This happens when there is
                      # no network defined for the service in the ServiceNetMap, which is OK
                      # as not all services have to be bound to a network, so we filter them
                      expression: dict($.data.map.items().where(isString($[1]) and not $[1].endsWith("_network")))
                      data:
                        map:
                          map_replace:
                            - map_merge:
                                repeat:
                                  template:
                                    SERVICE_network: SERVICE_network
                                  for_each:
                                    SERVICE:
                                      str_split: [',', {get_param: enabled_services}]
                            - values: {get_param: ServiceNetMap}
                  # Keystone doesn't provide separate entries for the public
                  # and admin endpoints, so we need to add them here manually
                  # like we do in the vip-config below
                  - keystone_admin_api_network: {get_param: [ServiceNetMap, keystone_admin_api_network]}
                    keystone_public_api_network: {get_param: [ServiceNetMap, keystone_public_api_network]}
                  # provides a mapping of service_name_ips to a list of IPs
                  - {get_param: service_ips}
                  - {get_param: service_node_names}
                  - {get_param: short_service_node_names}
                  - controller_node_ips:
                      list_join:
                      - ','
                      - {get_param: controller_ips}
                    controller_node_names:
                      list_join:
                      - ','
                      - {get_param: controller_names}
                    memcached_node_ips_v6:
                      str_replace:
                        template: "['inet6:[SERVERS_LIST]']"
                        params:
                          SERVERS_LIST:
                            list_join:
                            - "]','inet6:["
                            - {get_param: memcache_node_ips}

                    deploy_identifier: {get_param: DeployIdentifier}
                    update_identifier: {get_param: UpdateIdentifier}
                    stack_action: {get_param: StackAction}
            vip_data:
              mapped_data:
                map_merge:
                  # Dynamically generate per-service VIP data based on enabled_services
                  # This works as follows (outer->inner functions)
                  # yaql - filters services where no mapping exists in ServiceNetMap
                  #   map_replace: substitute e.g internal_api with the IP from NetVipMap
                  #     map_replace: substitute e.g heat_api_network with network name from ServiceNetMap
                  #       map_merge/repeat: generate a per-service mapping
                  - yaql:
                      # This filters any entries where the value hasn't been substituted for
                      # a list, e.g it's still $service_network.  This happens when there is
                      # no network defined for the service in the ServiceNetMap, which is OK
                      # as not all services have to be bound to a network, so we filter them
                      expression: dict($.data.map.items().where(isString($[1]) and not $[1].endsWith("_network")))
                      data:
                        map:
                          map_replace:
                            - map_replace:
                                - map_merge:
                                    repeat:
                                      template:
                                        SERVICE_vip: SERVICE_network
                                      for_each:
                                        SERVICE:
                                          str_split: [',', {get_param: enabled_services}]
                                - values: {get_param: ServiceNetMap}
                            - values: {get_param: NetVipMap}
                  - keystone_admin_api_vip:
                      get_param: [NetVipMap, {get_param: [ServiceNetMap, keystone_admin_api_network]}]
                    keystone_public_api_vip:
                      get_param: [NetVipMap, {get_param: [ServiceNetMap, keystone_public_api_network]}]
                    public_virtual_ip: {get_param: [NetVipMap, external]}
                    controller_virtual_ip: {get_param: [NetVipMap, ctlplane]}
                    internal_api_virtual_ip: {get_param: [NetVipMap, internal_api]}
                    storage_virtual_ip: {get_param: [NetVipMap, storage]}
                    storage_mgmt_virtual_ip: {get_param: [NetVipMap, storage_mgmt]}
                    redis_vip: {get_param: RedisVirtualIP}
                    # public_virtual_ip and controller_virtual_ip are needed in
                    # both HAproxy & keepalived.
                    tripleo::haproxy::public_virtual_ip: {get_param: [NetVipMap, external]}
                    tripleo::haproxy::controller_virtual_ip: {get_param: [NetVipMap, ctlplane]}
                    tripleo::keepalived::public_virtual_ip: {get_param: [NetVipMap, external]}
                    tripleo::keepalived::controller_virtual_ip: {get_param: [NetVipMap, ctlplane]}
                    tripleo::keepalived::internal_api_virtual_ip: {get_param: [NetVipMap, internal_api]}
                    tripleo::keepalived::storage_virtual_ip: {get_param: [NetVipMap, storage]}
                    tripleo::keepalived::storage_mgmt_virtual_ip: {get_param: [NetVipMap, storage_mgmt]}
                    tripleo::keepalived::redis_virtual_ip: {get_param: RedisVirtualIP}
                    tripleo::redis_notification::haproxy_monitor_ip: {get_param: [NetVipMap, ctlplane]}
                    cloud_name_external: {get_param: cloud_name_external}
                    cloud_name_internal_api: {get_param: cloud_name_internal_api}
                    cloud_name_storage: {get_param: cloud_name_storage}
                    cloud_name_storage_mgmt: {get_param: cloud_name_storage_mgmt}
                    cloud_name_ctlplane: {get_param: cloud_name_ctlplane}
                    # TLS parameters
                    certmonger_ca: {get_param: CertmongerCA}
                    enable_internal_tls: {get_param: EnableInternalTLS}

outputs:
  config_id:
    description: The ID of the allNodesConfigImpl resource.
    value:
      {get_resource: allNodesConfigImpl}