diff --git a/ansible/group_vars/sonic/vars b/ansible/group_vars/sonic/vars index 651978faa6b..1d7eddcc6f3 100644 --- a/ansible/group_vars/sonic/vars +++ b/ansible/group_vars/sonic/vars @@ -7,13 +7,13 @@ sonicadmin_initial_password: YourPaSsWoRd sonic_version: "v2" -broadcom_hwskus: [ 'Force10-S6000' ] +broadcom_hwskus: [ 'Force10-S6000', 'ingrasys-s9100' ] mellanox_hwskus: [ 'ACS-MSN2700' ] cavium_hwskus: [ "AS7512", "XP-SIM" ] -sensor_hwskus: [ "ACS-MSN2700", "Force10-S6000" ] +sensor_hwskus: [ "ACS-MSN2700", "Force10-S6000", 'ingrasys-s9100' ] ## Note: ## Docker volumes should be list instead of dict. However, if we want to keep code DRY, we @@ -36,6 +36,13 @@ orchagent_docker_volumes_dict: orchagent_docker_volumes: "{{ orchagent_docker_volumes_dict.keys() }}" +platform_monitor_docker_volumes_dict: + "/etc/fancontrol:/etc/fancontrol": + "/etc/sensors.conf:/etc/sensors.conf": + "/etc/sonic/:/etc/sonic/:ro": + +platform_monitor_docker_volumes: "{{ platform_monitor_docker_volumes_dict.keys() }}" + sonic_apt_repo: "http://packages.microsoft.com/repos/sonic-dev/" apt_repo: "http://debian-archive.trafficmanager.net/debian/" apt_default_release: "*" diff --git a/ansible/group_vars/sonic_latest/package_versions.yml b/ansible/group_vars/sonic_latest/package_versions.yml index 89e66e7562e..427f7a8dfce 100644 --- a/ansible/group_vars/sonic_latest/package_versions.yml +++ b/ansible/group_vars/sonic_latest/package_versions.yml @@ -1,4 +1,5 @@ platform_modules_s6000: { name: platform-modules-s6000 , version: "*" } +opennsl: { name: opennsl-modules-3.16.0-4-amd64 , version: "3.2.1.5-3*" } opennslv2: { name: opennsl-modules-3.16.0-4-amd64 , version: "3.2.1.5-3*" } version_sx_kernel: "*" version_mlnxsdk: "*" diff --git a/ansible/roles/sonic-common/files/ssw/ingrasys-s9100/etc/fancontrol b/ansible/roles/sonic-common/files/ssw/ingrasys-s9100/etc/fancontrol new file mode 100644 index 00000000000..bbc6ea1a0ed --- /dev/null +++ b/ansible/roles/sonic-common/files/ssw/ingrasys-s9100/etc/fancontrol @@ -0,0 +1,12 @@ +# Configuration file generated by pwmconfig, changes will be lost +INTERVAL=10 +DEVPATH=hwmon3=devices/pci0000:00/0000:00:1f.3/i2c-1/1-002f +DEVNAME=hwmon3=w83795adg +FCTEMPS=hwmon3/device/pwm2=hwmon3/device/temp2_input hwmon3/device/pwm1=hwmon3/device/temp2_input +#FCFANS=hwmon2/device/pwm2=hwmon2/device/fan8_input+hwmon2/device/fan7_input+hwmon2/device/fan6_input+hwmon2/device/fan5_input hwmon2/device/pwm1=hwmon2/device/fan4_input+hwmon2/device/fan3_input+hwmon2/device/fan2_input+hwmon2/device/fan1_input +FCFANS=hwmon3/device/pwm2=hwmon3/device/fan8_input hwmon3/device/pwm2=hwmon3/device/fan7_input hwmon3/device/pwm2=hwmon3/device/fan6_input hwmon3/device/pwm2=hwmon3/device/fan5_input hwmon3/device/pwm1=hwmon3/device/fan4_input hwmon3/device/pwm1=hwmon3/device/fan3_input hwmon3/device/pwm1=hwmon3/device/fan2_input hwmon3/device/pwm1=hwmon3/device/fan1_input +MINTEMP=hwmon3/device/pwm2=20 hwmon3/device/pwm1=20 +MAXTEMP=hwmon3/device/pwm2=60 hwmon3/device/pwm1=60 +MINSTART=hwmon3/device/pwm2=75 hwmon3/device/pwm1=75 +MINSTOP=hwmon3/device/pwm2=22 hwmon3/device/pwm1=22 + diff --git a/ansible/roles/sonic-common/files/ssw/ingrasys-s9100/etc/sensors.conf b/ansible/roles/sonic-common/files/ssw/ingrasys-s9100/etc/sensors.conf new file mode 100644 index 00000000000..44eedb4b11b --- /dev/null +++ b/ansible/roles/sonic-common/files/ssw/ingrasys-s9100/etc/sensors.conf @@ -0,0 +1,35 @@ +# libsensors configuration file +chip "i350bb-*" + ignore loc1 + +chip "jc42-*" + label temp1 "DIMM Temp" + set temp1_max 50 + set temp1_crit 85 + +chip "w83795adg-*" + label in0 "1.0V" + label in1 "1.0V_ROV" + label in2 "1.25V" + label in3 "1.8V" + ignore in4 + ignore in5 + ignore in6 + ignore in7 + label in12 "+3.3V" + ignore in14 + ignore in15 + ignore in16 + label fan1 "FANTRAY 1-A" + label fan2 "FANTRAY 1-B" + label fan3 "FANTRAY 2-A" + label fan4 "FANTRAY 2-B" + label fan5 "FANTRAY 3-A" + label fan6 "FANTRAY 3-B" + label fan7 "FANTRAY 4-A" + label fan8 "FANTRAY 4-B" + label temp1 "Front MAC Temp" + label temp2 "Rear MAC Temp" + ignore temp3 + ignore temp4 + ignore intrusion0 diff --git a/ansible/roles/sonic-common/tasks/platform-ingrasys.yml b/ansible/roles/sonic-common/tasks/platform-ingrasys.yml new file mode 100644 index 00000000000..f10894ba316 --- /dev/null +++ b/ansible/roles/sonic-common/tasks/platform-ingrasys.yml @@ -0,0 +1,9 @@ +- name: Setup Fancontrol Config + become: true + copy: src="roles/sonic-common/files/ssw/{{sonic_hwsku}}/etc/fancontrol" + dest=/etc/fancontrol + +- name: Setup Sensord Config + become: true + copy: src="roles/sonic-common/files/ssw/{{sonic_hwsku}}/etc/sensors.conf" + dest=/etc/sensors.conf diff --git a/ansible/roles/sonic-common/tasks/platform.yml b/ansible/roles/sonic-common/tasks/platform.yml index cab0a366470..0b0b4bf4dce 100644 --- a/ansible/roles/sonic-common/tasks/platform.yml +++ b/ansible/roles/sonic-common/tasks/platform.yml @@ -16,3 +16,9 @@ include: platform-cavm.yml when: sonic_hwsku == "AS7512" +# Install Platform Modules for Ingrasys +- name: Confirm Platform Modules for Ingrasys are installed + become: true + include: platform-ingrasys.yml + when: sonic_hwsku == "ingrasys-s9100" + diff --git a/ansible/roles/sonicv2/files/ssw/ingrasys-s9100/alias_map.json b/ansible/roles/sonicv2/files/ssw/ingrasys-s9100/alias_map.json new file mode 100644 index 00000000000..dd1324ae436 --- /dev/null +++ b/ansible/roles/sonicv2/files/ssw/ingrasys-s9100/alias_map.json @@ -0,0 +1,34 @@ +{ + "Ethernet8": "Ethernet8", + "Ethernet0": "Ethernet0", + "Ethernet4": "Ethernet4", + "Ethernet108": "Ethernet108", + "Ethernet100": "Ethernet100", + "Ethernet104": "Ethernet104", + "Ethernet96": "Ethernet96", + "Ethernet124": "Ethernet124", + "Ethernet120": "Ethernet120", + "Ethernet92": "Ethernet92", + "Ethernet28": "Ethernet28", + "Ethernet52": "Ethernet52", + "Ethernet56": "Ethernet56", + "Ethernet76": "Ethernet76", + "Ethernet72": "Ethernet72", + "Ethernet32": "Ethernet32", + "Ethernet16": "Ethernet16", + "Ethernet36": "Ethernet36", + "Ethernet12": "Ethernet12", + "Ethernet88": "Ethernet88", + "Ethernet24": "Ethernet24", + "Ethernet116": "Ethernet116", + "Ethernet80": "Ethernet80", + "Ethernet112": "Ethernet112", + "Ethernet84": "Ethernet84", + "Ethernet48": "Ethernet48", + "Ethernet44": "Ethernet44", + "Ethernet40": "Ethernet40", + "Ethernet64": "Ethernet64", + "Ethernet60": "Ethernet60", + "Ethernet20": "Ethernet20", + "Ethernet68": "Ethernet68" +} \ No newline at end of file diff --git a/ansible/roles/sonicv2/files/ssw/ingrasys-s9100/alias_reverse_map.json b/ansible/roles/sonicv2/files/ssw/ingrasys-s9100/alias_reverse_map.json new file mode 100644 index 00000000000..dd1324ae436 --- /dev/null +++ b/ansible/roles/sonicv2/files/ssw/ingrasys-s9100/alias_reverse_map.json @@ -0,0 +1,34 @@ +{ + "Ethernet8": "Ethernet8", + "Ethernet0": "Ethernet0", + "Ethernet4": "Ethernet4", + "Ethernet108": "Ethernet108", + "Ethernet100": "Ethernet100", + "Ethernet104": "Ethernet104", + "Ethernet96": "Ethernet96", + "Ethernet124": "Ethernet124", + "Ethernet120": "Ethernet120", + "Ethernet92": "Ethernet92", + "Ethernet28": "Ethernet28", + "Ethernet52": "Ethernet52", + "Ethernet56": "Ethernet56", + "Ethernet76": "Ethernet76", + "Ethernet72": "Ethernet72", + "Ethernet32": "Ethernet32", + "Ethernet16": "Ethernet16", + "Ethernet36": "Ethernet36", + "Ethernet12": "Ethernet12", + "Ethernet88": "Ethernet88", + "Ethernet24": "Ethernet24", + "Ethernet116": "Ethernet116", + "Ethernet80": "Ethernet80", + "Ethernet112": "Ethernet112", + "Ethernet84": "Ethernet84", + "Ethernet48": "Ethernet48", + "Ethernet44": "Ethernet44", + "Ethernet40": "Ethernet40", + "Ethernet64": "Ethernet64", + "Ethernet60": "Ethernet60", + "Ethernet20": "Ethernet20", + "Ethernet68": "Ethernet68" +} \ No newline at end of file diff --git a/ansible/roles/sonicv2/files/ssw/ingrasys-s9100/port_config.ini b/ansible/roles/sonicv2/files/ssw/ingrasys-s9100/port_config.ini new file mode 100644 index 00000000000..474d10a0fcb --- /dev/null +++ b/ansible/roles/sonicv2/files/ssw/ingrasys-s9100/port_config.ini @@ -0,0 +1,33 @@ +# alias lanes +Ethernet0 5,6,7,8 +Ethernet4 1,2,3,4 +Ethernet8 13,14,15,16 +Ethernet12 9,10,11,12 +Ethernet16 21,22,23,24 +Ethernet20 17,18,19,20 +Ethernet24 29,30,31,32 +Ethernet28 25,26,27,28 +Ethernet32 37,38,39,40 +Ethernet36 33,34,35,36 +Ethernet40 45,46,47,48 +Ethernet44 41,42,43,44 +Ethernet48 53,54,55,56 +Ethernet52 49,50,51,52 +Ethernet56 61,62,63,64 +Ethernet60 57,58,59,60 +Ethernet64 69,70,71,72 +Ethernet68 65,66,67,68 +Ethernet72 77,78,79,80 +Ethernet76 73,74,75,76 +Ethernet80 85,86,87,88 +Ethernet84 81,82,83,84 +Ethernet88 93,94,95,96 +Ethernet92 89,90,91,92 +Ethernet96 101,102,103,104 +Ethernet100 97,98,99,100 +Ethernet104 109,110,111,112 +Ethernet108 105,106,107,108 +Ethernet112 117,118,119,120 +Ethernet116 113,114,115,116 +Ethernet120 125,126,127,128 +Ethernet124 121,122,123,124 diff --git a/ansible/roles/sonicv2/tasks/sonic-brcm.yml b/ansible/roles/sonicv2/tasks/sonic-brcm.yml index 9377d114f70..222925220ce 100644 --- a/ansible/roles/sonicv2/tasks/sonic-brcm.yml +++ b/ansible/roles/sonicv2/tasks/sonic-brcm.yml @@ -78,3 +78,24 @@ docker_volumes_from: - database tags: orchagent + +- name: Remove platform-monitor docker container + include: sonicdocker.yml + vars: + docker_container: platform-monitor + docker_image: "{{ image_id_platform_monitor }}" + docker_privileged: yes + docker_state: absent + tags: platform-monitor + +- name: Start platform-monitor docker container + include: ../../sonic-common/tasks/sonicdocker.yml + vars: + docker_container: platform-monitor + docker_image: "{{ image_id_platform_monitor }}" + docker_privileged: yes + docker_state: reloaded + docker_volumes: "{{ platform_monitor_docker_volumes }}" + docker_volumes_from: + - database + tags: platform-monitor diff --git a/ansible/roles/sonicv2/templates/etc/systemd/system/platform-monitor.j2 b/ansible/roles/sonicv2/templates/etc/systemd/system/platform-monitor.j2 new file mode 100644 index 00000000000..19b74e063a3 --- /dev/null +++ b/ansible/roles/sonicv2/templates/etc/systemd/system/platform-monitor.j2 @@ -0,0 +1,12 @@ +[Unit] +Description=PLATFORM-MONITOR container +Requires=database.service +After=database.service + +[Service] +User={{ sonicadmin_user }} +ExecStart=/usr/bin/docker start -a platform-monitor +ExecStop=/usr/bin/docker stop platform-monitor + +[Install] +WantedBy=multi-user.target diff --git a/ansible/roles/test/templates/etc/systemd/system/platform-monitor.j2 b/ansible/roles/test/templates/etc/systemd/system/platform-monitor.j2 new file mode 120000 index 00000000000..908a5774070 --- /dev/null +++ b/ansible/roles/test/templates/etc/systemd/system/platform-monitor.j2 @@ -0,0 +1 @@ +../../../../../sonicv2/templates/etc/systemd/system/platform-monitor.j2 \ No newline at end of file