레이블이 Linux on POWER인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Linux on POWER인 게시물을 표시합니다. 모든 게시물 표시

2022년 12월 7일 수요일

Microsoft .NET 7, 이제 IBM Power에서도 지원

 


.NET 7이 이제 Linux on Power (ppc64le)에서도 지원됩니다.  즉 ppc64le 아키텍처의 Power 서버에서는 C# 언어도 지원하게 되었습니다.  이로써 microservices app 개발에 사용되는 5개 프로그래밍 언어가 모두 ppc64le에서 지원됩니다.  





즉, 과거에는 Oracle 등 AIX에서 수행되는 기간계 시스템과 연계하여 C# 언어로 작성된 업무 프로그램을 사용하기 위해서는 Windows 또는 Linux를 설치한 x86 시스템이 필요했으나, 이제는 x86이 필요하지 않고 같은 Power 시스템에 설치된 Redhat 또는 Openshift container에서 C# 업무 프로그램을 운용할 수 있게 된 것입니다.  





2021년 Stack Overflow에서의 개발자 설문에 따르면 .NET framework은 전업 개발자들에게 있어서 가장 중요한 프레임웍 및 라이브러리입니다. 







관련 발표는 아래 URL에서 좀 더 자세히 보실 수 있습니다.


https://community.ibm.com/community/user/powerdeveloper/blogs/janani-janakiraman/2022/11/07/net7-support-linux-on-power


또한 .NET 7 ppc64le는 이미 고객 reference가 있습니다.  독일의 컴퓨터 설계 관련 기업인 SKM Informatik GmbH인데, 이 기업의 요청으로 .NET 7의 ppc64le 지원이 시작되었다고 합니다.


https://www.ibm.com/downloads/cas/29RYARBY


.NET 7은 github에 그 source code가 공개되니 직접 build 하셔도 됩니다만, .NET 7 for ppc64le는 Openshift container 이미지로 제공되고 또 RHEL 8.7 또는 RHEL 9.1에서 YUM repository를 통해서도 제공됩니다.  


.NET 7 관련된 패키지들은 yum 명령어를 통해 패키지로 아래 예와 같이 설치하실 수 있습니다.  


[cecuser@p1274-pvm1 ~]$ hostnamectl

   Static hostname: p1274-pvm1

         Icon name: computer-vm

           Chassis: vm

        Machine ID: e5e70adcd98c4b56b00cc49cbf093412

           Boot ID: 36e5448112b5432c91f40abe413cb05a

    Virtualization: powervm

  Operating System: Red Hat Enterprise Linux 8.7 (Ootpa)

       CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos

            Kernel: Linux 4.18.0-372.9.1.el8.ppc64le

      Architecture: ppc64-le



[cecuser@p1274-pvm1 ~]$ yum list | grep dotnet

dotnet.ppc64le                                          7.0.100-1.el8_7                                             rhel-8-for-ppc64le-appstream-rpms

dotnet-apphost-pack-7.0.ppc64le                         7.0.0-1.el8_7                                               rhel-8-for-ppc64le-appstream-rpms

dotnet-host.ppc64le                                     7.0.0-1.el8_7                                               rhel-8-for-ppc64le-appstream-rpms

dotnet-hostfxr-7.0.ppc64le                              7.0.0-1.el8_7                                               rhel-8-for-ppc64le-appstream-rpms

dotnet-runtime-7.0.ppc64le                              7.0.0-1.el8_7                                               rhel-8-for-ppc64le-appstream-rpms

dotnet-sdk-7.0.ppc64le                                  7.0.100-1.el8_7                                             rhel-8-for-ppc64le-appstream-rpms

dotnet-sdk-7.0-source-built-artifacts.ppc64le           7.0.100-1.el8_7                                             codeready-builder-for-rhel-8-ppc64le-rpms

dotnet-targeting-pack-7.0.ppc64le                       7.0.0-1.el8_7                                               rhel-8-for-ppc64le-appstream-rpms

dotnet-templates-7.0.ppc64le                            7.0.100-1.el8_7                                             rhel-8-for-ppc64le-appstream-rpms




[cecuser@p1274-pvm1 ~]$ sudo yum install dotnet-sdk-7.0

Updating Subscription Management repositories.

Last metadata expiration check: 23:10:11 ago on Tue 06 Dec 2022 03:10:01 AM EST.

Dependencies resolved.

===================================================================================================

 Package                        Arch    Version            Repository                         Size

===================================================================================================

Installing:

 dotnet-sdk-7.0                 ppc64le 7.0.100-1.el8_7    rhel-8-for-ppc64le-appstream-rpms  53 M

Installing dependencies:

 aspnetcore-runtime-7.0         ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 2.8 M

 aspnetcore-targeting-pack-7.0  ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 1.6 M

 dotnet-apphost-pack-7.0        ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 100 k

 dotnet-host                    ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 190 k

 dotnet-hostfxr-7.0             ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 175 k

 dotnet-runtime-7.0             ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 7.8 M

 dotnet-targeting-pack-7.0      ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 2.9 M

 dotnet-templates-7.0           ppc64le 7.0.100-1.el8_7    rhel-8-for-ppc64le-appstream-rpms 3.1 M

 netstandard-targeting-pack-2.1 ppc64le 7.0.100-1.el8_7    rhel-8-for-ppc64le-appstream-rpms 1.5 M


Transaction Summary

===================================================================================================

Install  10 Packages


Total download size: 73 M

Installed size: 311 M

Is this ok [y/N]: y


...


Installed:

  aspnetcore-runtime-7.0-7.0.0-1.el8_7.ppc64le

  aspnetcore-targeting-pack-7.0-7.0.0-1.el8_7.ppc64le

  dotnet-apphost-pack-7.0-7.0.0-1.el8_7.ppc64le

  dotnet-host-7.0.0-1.el8_7.ppc64le

  dotnet-hostfxr-7.0-7.0.0-1.el8_7.ppc64le

  dotnet-runtime-7.0-7.0.0-1.el8_7.ppc64le

  dotnet-sdk-7.0-7.0.100-1.el8_7.ppc64le

  dotnet-targeting-pack-7.0-7.0.0-1.el8_7.ppc64le

  dotnet-templates-7.0-7.0.100-1.el8_7.ppc64le

  netstandard-targeting-pack-2.1-7.0.100-1.el8_7.ppc64le


Complete!


설치는 위와 같이 매우 간단합니다.  이제 "Hello, World!"를 프린트하는 샘플 프로그램을 돌려보도록 하겠습니다.


[cecuser@p1274-pvm1 ~]$ dotnet


Usage: dotnet [options]

Usage: dotnet [path-to-application]


Options:

  -h|--help         Display help.

  --info            Display .NET information.

  --list-sdks       Display the installed SDKs.

  --list-runtimes   Display the installed runtimes.


path-to-application:

  The path to an application .dll file to execute.



[cecuser@p1274-pvm1 ~]$ dotnet new console -o MyApp -f net7.0


Welcome to .NET 7.0!

---------------------

SDK Version: 7.0.100


----------------

Installed an ASP.NET Core HTTPS development certificate.

To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).

Learn about HTTPS: https://aka.ms/dotnet-https

----------------

Write your first app: https://aka.ms/dotnet-hello-world

Find out what's new: https://aka.ms/dotnet-whats-new

Explore documentation: https://aka.ms/dotnet-docs

Report issues and find source on GitHub: https://github.com/dotnet/core

Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli

--------------------------------------------------------------------------------------

The template "Console App" was created successfully.


Processing post-creation actions...

Restoring /home/cecuser/MyApp/MyApp.csproj:

  Determining projects to restore...

  Restored /home/cecuser/MyApp/MyApp.csproj (in 200 ms).

Restore succeeded.



[cecuser@p1274-pvm1 ~]$ cd MyApp


[cecuser@p1274-pvm1 MyApp]$  ls -la

total 12

drwxrwxr-x.  3 cecuser cecuser   55 Dec  7 02:24 .

drwx------. 23 cecuser cecuser 4096 Dec  7 02:24 ..

-rw-rw-r--.  1 cecuser cecuser  239 Dec  7 02:24 MyApp.csproj

drwxrwxr-x.  2 cecuser cecuser  168 Dec  7 02:24 obj

-rw-rw-r--.  1 cecuser cecuser  103 Dec  7 02:24 Program.cs


[cecuser@p1274-pvm1 MyApp]$ cat Program.cs

// See https://aka.ms/new-console-template for more information

Console.WriteLine("Hello, World!");


[cecuser@p1274-pvm1 MyApp]$ dotnet run

Hello, World!


[cecuser@p1274-pvm1 MyApp]$ ls -ltr

total 8

-rw-rw-r--. 1 cecuser cecuser 239 Dec  7 02:24 MyApp.csproj

-rw-rw-r--. 1 cecuser cecuser 103 Dec  7 02:24 Program.cs

drwxrwxr-x. 3 cecuser cecuser 181 Dec  7 02:26 obj

drwxrwxr-x. 3 cecuser cecuser  19 Dec  7 02:26 bin


[cecuser@p1274-pvm1 MyApp]$ ls -ltr bin/Debug/net7.0

total 168

-rw-rw-r--. 1 cecuser cecuser  10828 Dec  7 02:26 MyApp.pdb

-rw-rw-r--. 1 cecuser cecuser   4608 Dec  7 02:26 MyApp.dll

-rwxr-xr-x. 1 cecuser cecuser 139488 Dec  7 02:26 MyApp

-rw-rw-r--. 1 cecuser cecuser    385 Dec  7 02:26 MyApp.deps.json

-rw-rw-r--. 1 cecuser cecuser    139 Dec  7 02:26 MyApp.runtimeconfig.json


[cecuser@p1274-pvm1 MyApp]$ ./bin/Debug/net7.0/MyApp

Hello, World!




다만 아래의 MS 홈페이지의 .NET download 사이트에서는 ppc64le 관련 패키지는 별도로 제공되지 않네요.


https://devblogs.microsoft.com/dotnet/announcing-dotnet-7/







2017년 7월 7일 금요일

Redhat 7.3 ppc64le에서 SRP over infiniband 설치하기

SRP (SCSI RDMA Protocol)은 스토리지를 RDMA를 통해서 다른 서버가 접근하도록 해주는 프로토콜입니다.  주로 infiniband interface를 통해서 고속으로 스토리지를 서버에 연결할 때 사용됩니다.  이를 이용하면, 그리고 스토리지 HW가 infiniband interface를 지원한다면 서버와 스토리지를 연결할 때 16Gbps HBA보다 훨씬 더 빠르고 latency도 낮은 infiniband를 이용할 수 있습니다.   IBM의 all-flash storage인 FS900이 스토리지 자체적으로 infiniband interface를 제공합니다.  (4-port QDR IB card * 2장)

물론 이를 위해서는 서버도 infiniband driver에서 SRP를 지원해야 합니다.  여기서는 ppc64le, 즉 흔히 Linux on POWER라고 부르는 아키텍처에서도 SRP를 지원하는지, 또 어떻게 설치하는지를 알아 보겠습니다.   여기서는 Redhat 7.3 ppc64le를 썼습니다.

먼저, 아래 Redhat OS package들은 Mellanox OFED libary 설치에 필요한 것이므로 혹시 아직 설치 안되어 있다면 미리 설치해야 합니다.

[root@sys-88164 u0017496]# yum install lsof gcc-gfortran tcsh tk

다음으로, 아래 Mellanox site에서 OFED library를 download 받습니다.  Redhat 7.3 ppc64le용과 Ubuntu 16.04 ppc64le용 버전이 각각 준비되어 있습니다.

http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux_sw_drivers



저는 ISO image 대신 tgz 파일을 선택하여 download 받았습니다.

[root@sys-88164 u0017496]# tar -zxvf MLNX_OFED_LINUX-4.1-1.0.2.0-rhel7.3-ppc64le.tgz

[root@sys-88164 u0017496]# cd MLNX_OFED_LINUX-4.1-1.0.2.0-rhel7.3-ppc64le

그 속에 들어 있는 mlnxofedinstall 명령을 수행하면 됩니다.

[root@sys-88164 MLNX_OFED_LINUX-4.1-1.0.2.0-rhel7.3-ppc64le]# ./mlnxofedinstall
Detected rhel7u3 ppc64le. Disabling installing 32bit rpms...
Logs dir: /tmp/MLNX_OFED_LINUX-4.1-1.0.2.0.1939.logs
Verifying KMP rpms compatibility with target kernel...
This program will install the MLNX_OFED_LINUX package on your machine.
Note that all other Mellanox, OEM, OFED, RDMA or Distribution IB packages will be removed.
Those packages are removed due to conflicts with MLNX_OFED_LINUX, do not reinstall them.

Do you want to continue?[y/N]:y

rpm --nosignature -e --allmatches --nodeps rdma rdma. rdma rdma.

Starting MLNX_OFED_LINUX-4.1-1.0.2.0 installation ...

Installing mlnx-ofa_kernel RPM
Preparing...                          ########################################
Updating / installing...
mlnx-ofa_kernel-4.1-OFED.4.1.1.0.2.1.g########################################
Configured /etc/security/limits.conf
Installing kmod-mlnx-ofa_kernel 4.1 RPM
Preparing...                          ########################################
kmod-mlnx-ofa_kernel-4.1-OFED.4.1.1.0.########################################
Installing mlnx-ofa_kernel-devel RPM
Preparing...                          ########################################
Updating / installing...
mlnx-ofa_kernel-devel-4.1-OFED.4.1.1.0########################################
Installing kmod-kernel-mft-mlnx 4.7.0 RPM
Preparing...                          ########################################
kmod-kernel-mft-mlnx-4.7.0-1.rhel7u3  ########################################
Installing kernel-mft-mlnx-utils 4.7.0 RPM
Preparing...                          ########################################
kernel-mft-mlnx-utils-4.7.0-1.rhel7u3 ########################################
Installing knem-mlnx RPM
Preparing...                          ########################################
Updating / installing...
knem-mlnx-1.1.2.90mlnx2-OFED.4.0.1.6.3########################################
Installing kmod-knem-mlnx 1.1.2.90mlnx2 RPM
Preparing...                          ########################################
kmod-knem-mlnx-1.1.2.90mlnx2-OFED.4.0.########################################
Installing kmod-iser 4.0 RPM
Preparing...                          ########################################
kmod-iser-4.0-OFED.4.1.1.0.2.1.gc22af8########################################
Installing kmod-isert 4.0 RPM
Preparing...                          ########################################
kmod-isert-4.0-OFED.4.1.1.0.2.1.gc22af########################################
Installing mpi-selector RPM
Preparing...                          ########################################
Updating / installing...
mpi-selector-1.0.3-1.41102            ########################################
Installing user level RPMs:
Preparing...                          ########################################
ofed-scripts-4.1-OFED.4.1.1.0.2       ########################################
Preparing...                          ########################################
libibverbs-41mlnx1-OFED.4.1.0.1.1.4110########################################
Preparing...                          ########################################
libibverbs-devel-41mlnx1-OFED.4.1.0.1.########################################
Preparing...                          ########################################
libibverbs-devel-static-41mlnx1-OFED.4########################################
Preparing...                          ########################################
libibverbs-utils-41mlnx1-OFED.4.1.0.1.########################################
Preparing...                          ########################################
libmlx4-41mlnx1-OFED.4.1.0.1.0.41102  ########################################
Preparing...                          ########################################
libmlx4-devel-41mlnx1-OFED.4.1.0.1.0.4########################################
Preparing...                          ########################################
libmlx5-41mlnx1-OFED.4.1.0.1.5.41102  ########################################
Preparing...                          ########################################
libmlx5-devel-41mlnx1-OFED.4.1.0.1.5.4########################################
Preparing...                          ########################################
librxe-41mlnx1-OFED.4.1.0.1.7.41102   ########################################
Preparing...                          ########################################
librxe-devel-static-41mlnx1-OFED.4.1.0########################################
Preparing...                          ########################################
libibcm-41mlnx1-OFED.4.1.0.1.0.41102  ########################################
Preparing...                          ########################################
libibcm-devel-41mlnx1-OFED.4.1.0.1.0.4########################################
Preparing...                          ########################################
libibumad-13.10.2.MLNX20170511.dcc9f7a########################################
Preparing...                          ########################################
libibumad-devel-13.10.2.MLNX20170511.d########################################
Preparing...                          ########################################
libibumad-static-13.10.2.MLNX20170511.########################################
Preparing...                          ########################################
libibmad-1.3.13.MLNX20170511.267a441-0########################################
Preparing...                          ########################################
libibmad-devel-1.3.13.MLNX20170511.267########################################
Preparing...                          ########################################
libibmad-static-1.3.13.MLNX20170511.26########################################
Preparing...                          ########################################
ibsim-0.6mlnx1-0.8.g9d76581.41102     ########################################
Preparing...                          ########################################
ibacm-41mlnx1-OFED.4.1.0.1.0.41102    ########################################
Preparing...                          ########################################
librdmacm-41mlnx1-OFED.4.1.0.1.0.41102########################################
Preparing...                          ########################################
librdmacm-utils-41mlnx1-OFED.4.1.0.1.0########################################
Preparing...                          ########################################
librdmacm-devel-41mlnx1-OFED.4.1.0.1.0########################################
Preparing...                          ########################################
opensm-libs-4.9.0.MLNX20170607.280b8f7########################################
Preparing...                          ########################################
opensm-4.9.0.MLNX20170607.280b8f7-0.1.########################################
Preparing...                          ########################################
opensm-devel-4.9.0.MLNX20170607.280b8f########################################
Preparing...                          ########################################
opensm-static-4.9.0.MLNX20170607.280b8########################################
Preparing...                          ########################################
dapl-2.1.10mlnx-OFED.3.4.2.1.0.41102  ########################################
Preparing...                          ########################################
dapl-devel-2.1.10mlnx-OFED.3.4.2.1.0.4########################################
Preparing...                          ########################################
dapl-devel-static-2.1.10mlnx-OFED.3.4.########################################
Preparing...                          ########################################
dapl-utils-2.1.10mlnx-OFED.3.4.2.1.0.4########################################
Preparing...                          ########################################
perftest-4.1-0.4.g16dbf63.41102       ########################################
Preparing...                          ########################################
mstflint-4.7.0-1.6.g26037b7.41102     ########################################
Preparing...                          ########################################
mft-4.7.0-41                          ########################################
Preparing...                          ########################################
srptools-41mlnx1-4.41102              ########################################
Preparing...                          ########################################
ibutils2-2.1.1-0.91.MLNX20170612.g2e0d########################################
Preparing...                          ########################################
ibutils-1.5.7.1-0.12.gdcaeae2.41102   ########################################
Preparing...                          ########################################
cc_mgr-1.0-0.33.g9bd7c9a.41102        ########################################
Preparing...                          ########################################
dump_pr-1.0-0.29.g9bd7c9a.41102       ########################################
Preparing...                          ########################################
ar_mgr-1.0-0.34.g9bd7c9a.41102        ########################################
Preparing...                          ########################################
ibdump-5.0.0-1.41102                  ########################################
Preparing...                          ########################################
infiniband-diags-1.6.7.MLNX20170511.75########################################
Preparing...                          ########################################
infiniband-diags-compat-1.6.7.MLNX2017########################################
Preparing...                          ########################################
qperf-0.4.9-9.41102                   ########################################
Preparing...                          ########################################
mxm-3.6.3102-1.41102                  ########################################
Preparing...                          ########################################
ucx-1.2.2947-1.41102                  ########################################
Preparing...                          ########################################
sharp-1.3.1.MLNX20170625.859dc24-1.411########################################
Preparing...                          ########################################
hcoll-3.8.1649-1.41102                ########################################
Preparing...                          ########################################
openmpi-2.1.2a1-1.41102               ########################################
Preparing...                          ########################################
libibprof-1.1.41-1.41102              ########################################
Preparing...                          ########################################
mlnx-ethtool-4.2-1.41102              ########################################
Preparing...                          ########################################
mlnxofed-docs-4.1-1.0.2.0             ########################################
Preparing...                          ########################################
mpitests_openmpi-3.2.19-acade41.41102 ########################################

Installation finished successfully.

Preparing...                          ################################# [100%]
Updating / installing...
   1:mlnx-fw-updater-4.1-1.0.2.0      ################################# [100%]

Added 'RUN_FW_UPDATER_ONBOOT=no to /etc/infiniband/openib.conf

Updated /usr/share/hwdata/pci.ids
Attempting to perform Firmware update...
No devices found!

To load the new driver, run:
/etc/init.d/openibd restart


제가 테스트하는 이 서버에는 사실 inifiniband adapter가 안 붙어 있기 때문에 위와 같이 No devices found!라는 메시지가 보입니다.  이제 두가지 step만 남았습니다.   /etc/infiniband/openib.conf 속에 SRP_LOAD=yes를 넣고, openibd를 restart 하면 됩니다.


[root@sys-88164 u0017496]# vi /etc/infiniband/openib.conf
# Load SRP module
#SRP_LOAD=no
SRP_LOAD=yes

[root@sys-88164 u0017496]# /etc/init.d/openibd restart
Unloading HCA driver:                                      [  OK  ]
Loading HCA driver and Access Layer:                       [  OK  ]


이제 lsmod 명령으로, ib_srp 커널 모듈이 올라왔는지 확인하시면 됩니다.

[root@sys-88164 u0017496]# lsmod | grep srp
ib_srp                   990  0
mlx_compat             12745  15 rdma_cm,ib_cm,iw_cm,mlx4_en,mlx4_ib,mlx5_ib,ib_srp,ib_ucm,ib_core,ib_umad,ib_uverbs,mlx4_core,mlx5_core,rdma_ucm,ib_ipoib
scsi_transport_srp     18639  1 ibmvscsi
scsi_tgt               16721  1 scsi_transport_srp

보시다시피 잘 올라와 있습니다.  이후는 스토리지 엔지니어에게 맡기시면 됩니다.