LoginSignup
1
2

More than 3 years have passed since last update.

IBM Cloud Object Storage (ICOS) に Aspera SDK (Python) を使って高速アップロード

Posted at

はじめに

こちらを使います。

data-lake/upload/cos-upload at master · IBM-Cloud/data-lake

環境準備

Python を使います。

# python -V
Python 2.7.12

ファイルをダウンロードして実行権限を付与します。

git clone https://github.com/IBM-Cloud/data-lake.git
cd data-lake/upload/cos-upload/
chmod +x install.sh
chmod +x cos-upload.py

必要なライブラリ・環境を整備します。

pip install virtualenv
virtualenv -p /usr/bin/python2.7 cos-env
source cos-env/bin/activate
./install.sh

Aspera で高速アップロード

以下の変数を定義します。

export endpoint="jp-tok"
export apikey="*****"
export bucket="khayama-images"
export prefix="aspera"
export file="/root/rhcos-4.3.0-x86_64-installer.iso"

Kobito.iz0lx1.png

Aspera SDK (Python) を使って高速アップロードします。

# ./cos-upload.py --flatten $endpoint $apikey $bucket $prefix $file

Initialize COS and Aspera Transfer Manager using endpoint: https://s3.jp-tok.cloud-object-storage.appdomain.cloud

Upload file to COS: /root/rhcos-4.3.0-x86_64-installer.iso => aspera/rhcos-4.3.0-x86_64-installer.iso
Upload file to COS completed.

アップロードされたことが確認できました。

Kobito.rCQhWH.png

1
2
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
1
2