3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PowerVS のRHEL 8.6 に awscli とibmcloud cli を導入する

Posted at

はじめに

PowerVS の RHEL で ICOS(IBM Cloud Object Storage)操作のためにawscli の導入を確認しました。
ibmcloud cli コマンドが導入できることも合わせて確認しています。


対象読者

・PowerVS の RHEL(ppc64le) で ICOS(IBM Cloud Object Storage) の操作のために awscli、ibmcloud CLI を導入したい方


環境

IBM Cloud PowerSystems Virtual Server (PowerVS)
PowerVS VM : RHEL 8.6

・OSバージョン確認

# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.6 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.6 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/8/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.6
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.6"

・ppc64le 環境の確認

# uname -r
4.18.0-372.9.1.el8.ppc64le


# lscpu
アーキテクチャ:                      ppc64le
バイト順序:                          Little Endian
CPU:                                 8
オンラインになっている CPU のリスト: 0-7
コアあたりのスレッド数:              8
ソケットあたりのコア数:              0
ソケット数:                          2
NUMA ノード数:                       1
モデル:                              2.2 (pvr 004e 0202)
モデル名:                            POWER9 (architected), altivec supported
ハイパーバイザのベンダー:            pHyp
仮想化タイプ:                        準仮想化
L1d キャッシュ:                      32K
L1i キャッシュ:                      32K
NUMA ノード 1 CPU:                   0-7
Physical sockets:                    2
Physical chips:                      1
Physical cores/chip:                 10
#

実行前確認

# which aws
/usr/bin/which: no aws in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
#

まだawsコマンドは導入されていません

# which ibmcloud
/usr/bin/which: no ibmcloud in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

ibmcloud cli もまだ導入されていません。


yum で awscli 導入確認(失敗)

RHEL マニュアルを参考にして導入を試してみます。

RHEL : 4.3. AWS CLI のインストール

リポジトリ~は Base と AppStream があります。(awscli はリポジトリー内になさそうな予感...)

# yum repolist

サブスクリプション管理リポジトリーを更新しています。
repo id                                                                            repo の名前
rhel-8-for-ppc64le-appstream-rpms                                                  Red Hat Enterprise Linux 8 for Power, little endian - AppStream (RPMs)
rhel-8-for-ppc64le-baseos-rpms                                                     Red Hat Enterprise Linux 8 for Power, little endian - BaseOS (RPMs)

yum install を実行します。

# yum install awscli

サブスクリプション管理リポジトリーを更新しています。
メタデータの期限切れの最終確認: 0:19:40 時間前の 2023年01月30日 02時51分42秒 に実施しました。
一致した引数がありません: awscli
エラー: 一致するものが見つかりません: awscli
#

やはり Base, AppStream には存在していませんでした。
マニュアルは AWSで作成したVSIの場合のためAWS環境用ですね。

AWSのマニュアルの方にhも ppc64le については記載はありません

Installing or updating the latest version of the AWS CLI


pip3 で awscli 導入確認(成功)

ネットを検索していると pipで導入している例があったので試してみます。

# pip3 install awscli
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting awscli
  Downloading https://files.pythonhosted.org/packages/6c/48/8cf68d31f3f8606904acc4d98965a2c020acd5e1b9a821b8a7fafdbbc81a/awscli-1.24.10-py3-none-any.whl (3.9MB)
    100% |████████████████████████████████| 3.9MB 342kB/s
Collecting docutils<0.17,>=0.10 (from awscli)
  Downloading https://files.pythonhosted.org/packages/81/44/8a15e45ffa96e6cf82956dd8d7af9e666357e16b0d93b253903475ee947f/docutils-0.16-py2.py3-none-any.whl (548kB)
    100% |████████████████████████████████| 552kB 2.2MB/s
Requirement already satisfied: PyYAML<5.5,>=3.10 in /usr/lib64/python3.6/site-packages (from awscli)
Collecting rsa<4.8,>=3.1.2 (from awscli)
  Downloading https://files.pythonhosted.org/packages/e9/93/0c0f002031f18b53af7a6166103c02b9c0667be528944137cc954ec921b3/rsa-4.7.2-py3-none-any.whl
Collecting s3transfer<0.6.0,>=0.5.0 (from awscli)
  Downloading https://files.pythonhosted.org/packages/7b/9c/f51775ebe7df5a7aa4e7c79ed671bde94e154bd968aca8d65bb24aba0c8c/s3transfer-0.5.2-py3-none-any.whl (79kB)
    100% |████████████████████████████████| 81kB 10.1MB/s
Collecting colorama<0.4.5,>=0.2.5 (from awscli)
  Downloading https://files.pythonhosted.org/packages/44/98/5b86278fbbf250d239ae0ecb724f8572af1c91f4a11edf4d36a206189440/colorama-0.4.4-py2.py3-none-any.whl
Collecting botocore==1.26.10 (from awscli)
  Downloading https://files.pythonhosted.org/packages/09/b8/794e0bd260198538ded90c26b353ddb632eab01950d4e7e2e2b8ee510d12/botocore-1.26.10-py3-none-any.whl (8.8MB)
    100% |████████████████████████████████| 8.8MB 141kB/s
Collecting pyasn1>=0.1.3 (from rsa<4.8,>=3.1.2->awscli)
  Downloading https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77kB)
    100% |████████████████████████████████| 81kB 10.4MB/s
Collecting urllib3<1.27,>=1.25.4 (from botocore==1.26.10->awscli)
  Downloading https://files.pythonhosted.org/packages/fe/ca/466766e20b767ddb9b951202542310cba37ea5f2d792dae7589f1741af58/urllib3-1.26.14-py2.py3-none-any.whl (140kB)
    100% |████████████████████████████████| 143kB 7.6MB/s
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/lib/python3.6/site-packages (from botocore==1.26.10->awscli)
Collecting jmespath<2.0.0,>=0.7.1 (from botocore==1.26.10->awscli)
  Downloading https://files.pythonhosted.org/packages/07/cb/5f001272b6faeb23c1c9e0acc04d48eaaf5c862c17709d20e3469c6e0139/jmespath-0.10.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5 in /usr/lib/python3.6/site-packages (from python-dateutil<3.0.0,>=2.1->botocore==1.26.10->awscli)
Installing collected packages: docutils, pyasn1, rsa, urllib3, jmespath, botocore, s3transfer, colorama, awscli
Successfully installed awscli-1.24.10 botocore-1.26.10 colorama-0.4.4 docutils-0.16 jmespath-0.10.0 pyasn1-0.4.8 rsa-4.7.2 s3transfer-0.5.2 urllib3-1.26.14
#

導入できました!

# which aws
/usr/local/bin/aws

# aws --version
aws-cli/1.24.10 Python/3.6.8 Linux/4.18.0-372.9.1.el8.ppc64le botocore/1.26.10

こちらは v1 系のCLIとなります。COS の簡易な操作だけであれば、v1でも問題ないのかと推測。

# aws --help
Note: AWS CLI version 2, the latest major version of the AWS CLI, is now stable and recommended for general use. For more information, see the AWS CLI version 2 installation instructions at: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: the following arguments are required: command
#

ibmcloud cli の導入

RHEL8.6 ppc64le に ibmcloud cli のインストールを実施します。

IBM Cloud CLI のインストーラーには ppc64le 版がきちんと存在していましたので導入できそうですね。

https://github.com/IBM-Cloud/ibm-cloud-cli-release/releases/
(Power Linux 64 bit)

・参考手順 スタンドアロン IBM Cloud CLI のインストール

"シェルからのインストール"で実行します。(public ネットワークへの接続が必要です)

# curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
Current platform is ppc64le. Downloading corresponding IBM Cloud CLI...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10.4M  100 10.4M    0     0  3383k      0  0:00:03  0:00:03 --:--:-- 3383k
Download complete. Executing installer...
Bluemix_CLI/
Bluemix_CLI/bin/
Bluemix_CLI/bin/ibmcloud
Bluemix_CLI/bin/ibmcloud.sig
Bluemix_CLI/bin/NOTICE
Bluemix_CLI/bin/LICENSE
Bluemix_CLI/bin/CF_CLI_Notices.txt
Bluemix_CLI/bin/CF_CLI_SLC_Notices.txt
Bluemix_CLI/autocomplete/
Bluemix_CLI/autocomplete/bash_autocomplete
Bluemix_CLI/autocomplete/zsh_autocomplete
Bluemix_CLI/install
Bluemix_CLI/uninstall
Bluemix_CLI/install_bluemix_cli
Install complete.


# which ibmcloud
/usr/local/bin/ibmcloud

# ibmcloud --version
ibmcloud version 2.14.0+fd1bfc6-2023-01-24T22:18:53+00:00

導入できました。


参考:AIXでの awscli 導入

AIX の awscli 導入は以下で確認しています。

以上です。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?