瀏覽代碼

Delete control_plane/roles/control_plane_sm directory

Signed-off-by: Shubhangi-dell <shubhangi_srivastava@dell.com>
Shubhangi-dell 3 年之前
父節點
當前提交
932c625c47

+ 0 - 17
control_plane/roles/control_plane_sm/files/Dockerfile

@@ -1,17 +0,0 @@
-FROM centos:8
-
-RUN dnf -y update && dnf clean all
-
-RUN dnf install -y epel-release
-
-RUN dnf groupinstall "Infiniband Support" -y
-
-RUN dnf install -y opensm
-
-COPY opensm.conf /etc/rdma/opensm.conf
-
-COPY start.sh /
-
-RUN chmod +x /start.sh
-
-ENTRYPOINT ["/start.sh"]

+ 0 - 43
control_plane/roles/control_plane_sm/files/k8s_sm.yml

@@ -1,43 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: subnet-manager
-  namespace: subnet-manager
-  labels:
-    app: subnet-manager
-spec:
-  selector:
-    matchLabels:
-      app: subnet-manager
-  replicas: 1
-  strategy:
-    type: RollingUpdate
-  template:
-    metadata:
-      labels:
-        app: subnet-manager
-    spec:
-      hostNetwork: true
-      containers:
-        - name: opensm-service
-          image: 'localhost/opensm-service:latest'
-          imagePullPolicy: Never
-          volumeMounts:
-            - mountPath: /var/cache/opensm
-              name: opensm-cache
-            - mountPath: /var/log
-              name: opensm-logs
-          resources:
-            limits:
-              memory: "10Gi"
-          securityContext:
-            privileged: true
-      volumes:
-        - name: opensm-cache
-          hostPath:
-            path: /var/cache/opensm
-            type: Directory
-        - name: opensm-logs
-          hostPath:
-            path: /var/log
-            type: Directory

+ 0 - 5
control_plane/roles/control_plane_sm/files/start.sh

@@ -1,5 +0,0 @@
-#!/bin/sh
-
-/usr/libexec/rdma-init-kernel
-
-exec /usr/sbin/opensm -F /etc/rdma/opensm.conf

+ 0 - 28
control_plane/roles/control_plane_sm/tasks/create_image.yml

@@ -1,28 +0,0 @@
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
-#
-# 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.
----
-# tasks file for sm image creation
-
-- name: Get buildah images
-  command: buildah images
-  changed_when: false
-  register: buildah_images
-  tags: install
-
-- name: Subnet manager image creation (It may take 5-10 mins)
-  command: "buildah bud -t {{ sm_docker_image_name }}:{{ sm_docker_image_tag }} --network host -f {{ role_path }}/files/Dockerfile"
-  args:
-    chdir: "{{ role_path }}/files/"
-  when: "sm_docker_image_name not in buildah_images.stdout"
-  tags: install

+ 0 - 67
control_plane/roles/control_plane_sm/tasks/create_pod.yml

@@ -1,67 +0,0 @@
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
-#
-# 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.
----
-# tasks file for sm pod creation
-- name: Get namespaces
-  command: kubectl get namespaces
-  changed_when: false
-  register: k8s_namespaces
-  tags: install
-
-- name: Ensure that namespace is created
-  command: kubectl create namespace subnet-manager
-  when: "'subnet-manager' not in k8s_namespaces.stdout"
-  tags: install
-
-- name: Get K8s pods
-  command: kubectl get pods --all-namespaces
-  changed_when: false
-  register: k8s_pods
-  tags: install
-
-- name: Create subnet manager pod
-  block:
-    - name: Replace container name in sm config file
-      replace:
-        path: "{{ sm_kube_config_file }}"
-        regexp: "      containers:\n        - name:.*"
-        replace: "      containers:\n        - name: {{ sm_container_name }}"
-      tags: install
-
-    - name: Replace image name in sm config file
-      replace:
-        path: "{{ sm_kube_config_file }}"
-        regexp: "          image:.*"
-        replace: "          image: 'localhost/{{ sm_docker_image_name }}:{{ sm_docker_image_tag }}'"
-      tags: install
-
-    - name: Replace cache directory in sm config file
-      replace:
-        path: "{{ sm_kube_config_file }}"
-        regexp: "        - name: opensm-cache\n          hostPath:\n            path:.*"
-        replace: "        - name: opensm-cache\n          hostPath:\n            path: {{ subnet_manager.cache_directory }} "
-      tags: install
-
-    - name: Replace cache directory in sm config file
-      replace:
-        path: "{{ sm_kube_config_file }}"
-        regexp: "        - name: opensm-logs\n          hostPath:\n            path:.*"
-        replace: "        - name: opensm-logs\n          hostPath:\n            path: {{ subnet_manager.log_directory }} "
-      tags: install
-
-    - name: Create subnet manager pod
-      command: "kubectl apply -f {{ sm_kube_config_file }}"
-      tags: install
-
-  when: "'subnet-manager' not in k8s_pods.stdout"

+ 0 - 31
control_plane/roles/control_plane_sm/tasks/main.yml

@@ -1,31 +0,0 @@
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
-#
-# 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.
----
-# tasks file for control_plane_sm
-
-- name: Check if IB switch is supported
-  block:
-    - name: Check pre-requisites
-      include_tasks: pre_requisites.yml
-      tags: install
-
-    - name: Create image
-      include_tasks: create_image.yml
-      tags: install
-
-    - name: Check pod
-      include_tasks: create_pod.yml
-      tags: install
-
-  when: ib_switch_support

+ 0 - 50
control_plane/roles/control_plane_sm/tasks/pre_requisites.yml

@@ -1,50 +0,0 @@
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
-#
-# 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.
----
-
-# pre-req
-
-- name: Create directories if they don't exist
-  block:
-    - name: Checking directory
-      stat:
-        path: "{{ item }}"
-      register: stat_result
-      with_items:
-        - "{{ subnet_manager.cache_directory }}"
-        - "{{ subnet_manager.log_directory }}"
-      loop_control:
-        label: "{{ item }}"
-      tags: install
-
-    - name: Creating directories
-      file:
-        path: "{{ item.item }}"
-        state: directory
-        mode: "{{ folder_perm }}"
-        group: root
-        owner: root
-      when: not item.stat.exists
-      loop: "{{ stat_result.results }}"
-      loop_control:
-        label: "{{ item.item }}"
-      tags: install
-
-- name: Copy opensm configuration file
-  copy:
-    src: "{{ opensm_conf_file }}"
-    dest: "{{ opensm_conf_file_dest }}"
-    mode: preserve
-    force: yes
-  tags: install

+ 0 - 27
control_plane/roles/control_plane_sm/vars/main.yml

@@ -1,27 +0,0 @@
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
-#
-# 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.
----
-
-# Usage: pre_requisites.yml
-folder_perm: 644
-opensm_conf_file: "{{ role_path }}/../../input_params/opensm.conf"
-opensm_conf_file_dest: "{{ role_path }}/files/opensm.conf"
-
-# Usage: create_image.yml
-sm_docker_image_name: opensm-service
-sm_docker_image_tag: latest
-
-#Usage: create_pod.yml
-sm_container_name: opensm-container
-sm_kube_config_file: "{{ role_path }}/files/k8s_sm.yml"