System Purpose in Red Hat Enterprise Linux 8 Shinji Kito Sr. Technical Account Manager 2019/06/05 1
Red Hat Enterprise Linux 8について 2
自己紹介 Shinji Kito Shinji Kito 2009年 Red Hat 入社 Linuxの経験 20年以上 複数のスタートアップ Larry ootpa Troan 3 ootpa = ewt (oot) + pa
教育とは学校で習つたことを悉 ことごと く忘れた そ の後に残つてゐるものをいふのだ これは実に穿 うが つた言葉である 新渡戸稲造 4
Agenda 1. 背景/なぜSystem Purposeが必要なのか 2. ツールの紹介 (anaconda/subscription-manager/syspurpose) 3. Cockpitプラグイン 5
1. 背景/なぜSystem Purposeが必要なのか 6
RHEL7でのサブスクリプション (x86_64の場合). など 7 SKU: Stock Keeping Unit - 製品やサービスの固有のID https://access.redhat.com/ja/articles/1280223 (DesktopとWorkstationの比較)
Product Key File (1/3) Product keyの確認方法 # rct cat-cert /etc/pki/product/69.pem +-------------------------------------------+ 製品証明書 +-------------------------------------------+ 証明書: パス: /etc/pki/product/69.pem... 開始日: 2015-09-11 11:09:22+00:00 終了期日: 2035-09-06 11:09:22+00:00... 製品: ID: 69 名前: Red Hat Enterprise Linux Server バージョン: 7.2 アーキテクチャー: x86_64 タグ: rhel-7,rhel-7-server 8 Source: https://access.redhat.com/solutions/373533
Product Key File (2/3) Product keyを再度ダウンロードするには 9 Source: https://access.redhat.com/labs/rhpc/
Product Key File (3/3) RHEL8では Product ID 479を使用します 10 Source: https://access.redhat.com/labs/rhpc/
RHEL7/8でのProduct Key (x86_64の場合)...など 11 Source: https://access.redhat.com/solutions/373533
RHEL7でのサブスクリプション (s390x/ppc64/ppc64le/aarch64の場合) 12 ALT(Alternative Architectures): RHEL7.5以降で提供している 4.14 ベースのカーネル kernel-alt パッケージです
サブスクリプションの確認方法 1. https://access.redhat.com/management/subscriptions にアクセスします 2. サブスクリプション名をクリックします 3. 詳細が表示されます 13 Source: https://access.redhat.com/solutions/967653
問題点や課題 RHEL8では x86_64が複数のエディションから1つに統合され ました x86_64のそれぞれのエディションは 費用が異なります 既に購入された同じSKUを引き続き使いたいです どうやってRHEL8のx86_64のシステムを適切なSubscription と紐づけたらいいのか 14
解決策 System Purpose (1/2) エンタイトルサーバに必要な情報を提供し 最も適切な Subscription SKUを紐づけます 15
解決策 System Purpose (2/2) どのようにして 3つの質問 Role Service Level Usage AddOns (RHEL8.1) 3つのツール anaconda subscription-manager syspurpose (new) 16
2. ツールの紹介 (anaconda/subscription-manager/syspurpose) 17
System Purpose: anaconda 18 1. 2. 3. Role Service Level Agreement Usage
System Purpose: subscription-manager 新規モジュール: role, service-level, usage, (addons) [root@rhel8 ~]# subscription-manager --help egrep "addons role service-level usage" addons システムの目的のアドオン属性を変更または表示します role システムの目的ロールを変更します service-level このシステムのサービスレベルを管理します usage このシステムの使用状況に関する設定を管理します 19
System Purpose: subscription-manager 新規モジュール: role [root@rhel8 ~]# subscription-manager role --help 使用方法: subscription-manager role [オプション] システムの目的ロールを変更します オプション: -h, --help ヘルプメッセージを表示して終了します --proxy=proxy_url proxy_hostname:proxy_port 形式のプロキシー URL... --set=set Set role of system purpose --unset Unset role of system purpose [root@rhel8 ~]# subscription-manager role --set "RHEL Server" role set to "RHEL Server". [root@rhel8 ~]# subscription-manager role --unset role の設定が解除されました 20
System Purpose: subscription-manager 変更になったモジュール: service-level [root@rhel8 ~]# subscription-manager service-level --help 使用方法: subscription-manager service-level [オプション] このシステムのサービスレベルを管理します オプション: -h, --help ヘルプメッセージを表示して終了します --proxy=proxy_url proxy_hostname:proxy_port 形式のプロキシー URL [root@rhel8 ~]# subscription-manager service-level --set "Premium" service_level_agreement set to "Premium". [root@rhel8 ~]# subscription-manager service-level --unset service_level_agreement の設定が解除されました 21
System Purpose: subscription-manager 新規モジュール: usage [root@rhel8 ~]# subscription-manager usage --help 使用方法: subscription-manager usage [オプション] このシステムの使用状況に関する設定を管理します オプション: -h, --help... ヘルプメッセージを表示して終了します [root@rhel8 ~]# subscription-manager usage --set "Development/Test" usage set to "Development/Test". [root@rhel8 ~]# subscription-manager usage --unset usage の設定が解除されました 22
System Purpose: subscription-manager 新規モジュール: addons [root@rhel8 ~]# subscription-manager addons --help You are attempting to use a locale that is not installed. 使用方法: subscription-manager addons [オプション] システムの目的のアドオン属性を変更または表示します オプション: -h, --help... ヘルプメッセージを表示して終了します [root@rhel8 ~]# subscription-manager addons --add "Extended Update Support" addons を更新しました [root@rhel8 ~]# subscription-manager addons --remove "Extended Update Support" Addons を更新しました [root@rhel8 ~]# subscription-manager addons --unset addons の設定が解除されました 23
subscription-manager-gui 24 RHEL5 RHEL6 RHEL7 RHEL8
System Purpose: syspurpose 新規ツール: python3-syspurpose.rpm [root@rhel8 ~]# rpm -q python3-syspurpose python3-syspurpose-1.23.8-35.el8.x86_64 25 [root@rhel8 ~]# syspurpose --help usage: syspurpose [-h]... sub-command help set 指定プロパティーの値を設定 unset 指定プロパティーの値を無効化 (削除) add 指定プロパティーに値を追加 remove 指定プロパティーから値を削除 set-role Set the system role to the system syspurpose unset-role Clear set role add-addons Add addons to the system syspurpose remove-addons Remove addons from the system syspurpose unset-addons Clear set addons set-sla システム SLA を設定 unset-sla SLA の設定を削除 set-usage システムの使用方法を設定します unset-usage Clear set usage show 現行システムの syspurpose を表示します
System Purpose: syspurpose [root@rhel8 ~]# syspurpose set-role "RHEL Server" role に設定された RHEL Server System purpose successfully sent to subscription management server. [root@rhel8 ~]# syspurpose set-sla "Premium" service_level_agreement に設定された Premium System purpose successfully sent to subscription management server. [root@rhel8 ~]# syspurpose set-usage "Production" usage に設定された Production System purpose successfully sent to subscription management server. [root@rhel8 ~]# syspurpose add-addons "Extended Update Support" Added Extended Update Support to addons. System purpose successfully sent to subscription management server. [root@rhel8 ~]# syspurpose show { "addons": [ "Extended Update Support" ], "role": "RHEL Server", "service_level_agreement": "Premium", "usage": "Production" } System purpose successfully sent to subscription management server. 26
Demo: System Purpose: syspurpose 27
System Purpose: syspurpose RFE BZs BZ#1632283(private) - [RFE] subscription-manager and syspurpose should warn when setting a role, addon, usage, or SLA not available for the organization. BZ#1634023(private) - [RFE] - Provide a way to list the valid syspurpose values for end user 28
System Purpose: ログファイル [root@rhel8 ~]# tail -f /var/log/rhsm/rhsm.log... 2019-05-15 18:10:44,378 [INFO] syspurpose:10018:mainthread @connection.py:924 - Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=false 2019-05-15 18:10:44,989 [INFO] syspurpose:10018:mainthread @connection.py:638 - Response: status=200, request="get /subscription/status" 2019-05-15 18:10:45,729 [INFO] syspurpose:10018:mainthread @connection.py:638 - Response: status=200, requestuuid=d6fe8765-0c43-4189-b138-477b9bf13d27, request="get /subscription/consumers/bd09654f-c238-46b5-a1c1-92861b3ec4aa" 2019-05-15 18:10:46,470 [INFO] syspurpose:10018:mainthread @connection.py:638 - Response: status=204, requestuuid=08a74730-76d2-4471-9a50-686f4ee52b49, request="put /subscription/consumers/bd09654f-c238-46b5-a1c1-92861b3ec4aa" 29
3. Cockpitプラグイン 30
Cockpitとは 31 Webベースの対話型サーバー管理インターフェース システムのモニターや管理ができます ログの表示 ソートができます ストレージのモニターや管理ができます ネットワーキングのモニターや管理ができます ブラウザ上でターミナルの操作ができます
Cockpitの使い方 (1/2) [root@rhel8 ~]# yum install cockpit [root@rhel8 ~]# firewall-cmd --list-all public (active) target: default icmp-block-inversion: no interfaces: ens3 sources: services: cockpit dhcpv6-client ssh [root@rhel8 ~]# ssh skito@localhost... skito@localhost's password: Activate the web console with: systemctl enable --now cockpit.socket [root@rhel8 ~]# systemctl enable --now cockpit.socket Created symlink /etc/systemd/system/sockets.target.wants/cockpit.socket /usr/lib/systemd/system/cockpit.socket. [root@rhel8 ~]# ssh skito@localhost skito@localhost's password: Web console: https://rhel8.localdomain:9090/ or https://192.168.122.72:9090/ Last login: Tue May 14 15:21:47 2019 from 192.168.122.1 32
Cockpitの使い方 (2/2) 1 2 33 3
Cockpitのログイン画面 sudoと同じ 34
Cockpitのオーバービュー 35
Cockpit: iphone/ipadなどの画面 36
Cockpit: Subscription (登録 1/3) 37
Cockpit: Subscription (登録 2/3) 38 Source: https://access.redhat.com/articles/1378093 (Creating Red Hat Activation Keys)
Cockpit: Subscription (登録 3/3) 39
まとめ System Purposeが必要な理由 変更 追加されたツール Cockpitとプラグインについて 40
捕足 パフォーマンス プロファイル System Purpose Tuned profile 41
補足 セッション レコーディングの設定 (1/2) [root@rhel8 ~]# yum install tlog cockpit-session-recording [root@rhel8 sssd]# cat /etc/sssd/sssd.conf [domain/local] id_provider = files [sssd] domains = local services = nss, pam, ssh, sudo [root@rhel8 sssd]# chmod 600 sssd.conf [root@rhel8 sssd]# systemctl restart sssd [root@rhel8 sssd]# systemctl enable --now cockpit.socket // Journal database logs do not survive a system reboot, so change the storage option to persistent [root@rhel8 sssd]# mkdir -p /var/log/journal [root@rhel8 sssd]# sed -i 's/#storage=auto/storage=persistent/' /etc/systemd/journald.conf [root@rhel8 sssd]# systemctl restart systemd-journald.service 42
補足 セッション レコーディングの設定 (2/2) 43
補足 セッション レコーディングでの記録 [skito@fedora29 tmp]$ ssh skito@demo skito@demo's password: Activate the web console with: systemctl enable --now cockpit.socket Last login: Fri May 24 16:39:57 2019 from ::1 ATTENTION! Your session is being recorded! 44
補足 セッション レコーディングの再生 (1/2) 45
補足 セッション レコーディングの再生 (2/2) [root@rhel8 ~]# journalctl -o verbose grep -i \"rec\" MESSAGE={"ver":"2.2","host":"rhel8.skito","rec":"2a4895dacc414eec9d057ad53b1acbca-4abf-2e078","user":"skito","ter m":"xterm-256color","session":15,"id":1,"pos":0,"timing":"=124x24+74>35","in_txt":"","in_bin":[],"out_txt":"\u001b]0;ski to@rhel8:~\u0007[skito@rhel8 ~]$ ","out_bin":[]} MESSAGE={"ver":"2.2","host":"rhel8.skito","rec":"2a4895dacc414eec9d057ad53b1acbca-4abf-2e078","user":"skito","ter m":"xterm-256color","session":15,"id":2,"pos":268494,"timing":"=124x24>1+64>1+150>1+161>1+309>1+134>1+69>1+182>1+150>50+ 711>1+77>1+66>1+771>1+71>1+574>1+388>2+68>42","in_txt":"","in_bin":[],"out_txt":"hostname\r\nrhel8.skito\r\n\u001b]0;ski to@rhel8... [root@rhel8 ~]# tlog-play -r journal -M TLOG_REC=2a4895dacc414eec9d057ad53b1acbca-4abf-2e078 [skito@rhel8 ~]$ hostname rhel8.skito [skito@rhel8 ~]$ whoami skito. 46
References 47 https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/ (Product Documentation for Red Hat Enterprise Linux 8) https://access.redhat.com/articles/3973711 (Red Hat Enterprise Linux 8 Beta Feature Overview Videos) https://github.com/cockpit-project/cockpit/wiki (Cockpit Wiki) https://cockpit-project.org/ https://access.redhat.com/articles/1189123 (Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8) https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/package_manifest /index https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/monitoring_and_ managing_system_status_and_performance/using-the-web-console-for-selecting-performance-profile s_monitoring-and-managing-system-status-and-performance
Q&A 48
Thank you! 49