osm

? ☁️ Object Store Manipulator - curl for cloud storage

  • 所有者: appscode/osm
  • 平台:
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Go Report Card
Build Status
codecov
Docker Pulls
Slack
Twitter

osm

Object Store Manipulator (osm: pronounced like awesome) - curl for cloud storage services. ? osm can create & delete buckets and upload, download & delete files from buckets for AWS S3, AWS S3 compatible other storage services(i.e. Minio), DigitalOcean Spaces, Google Cloud Storage, Microsoft Azure storage and OpenStack Swift. Its single binary can be easily packaged instead of official python based clis inside Docker images.

Install OSM

You can download and install a pre-built binary:

# Linux amd 64-bit:
wget -O osm https://cdn.appscode.com/binaries/osm/0.9.1/osm-linux-amd64 \
  && chmod +x osm \
  && sudo mv osm /usr/local/bin/

# Linux 386 32-bit:
wget -O osm https://cdn.appscode.com/binaries/osm/0.9.1/osm-linux-386 \
  && chmod +x osm \
  && sudo mv osm /usr/local/bin/

# Mac 64-bit
wget -O osm https://cdn.appscode.com/binaries/osm/0.9.1/osm-darwin-amd64 \
  && chmod +x osm \
  && sudo mv osm /usr/local/bin/

# Mac 32-bit
wget -O osm https://cdn.appscode.com/binaries/osm/0.9.1/osm-darwin-386 \
  && chmod +x osm \
  && sudo mv osm /usr/local/bin/

To build from source, run: go get -u github.com/appscode/osm

Usage

osm [command] [flags]
osm [command]

Available Commands:
  config      OSM configuration
  help        Help about any command
  lc          List containers
  ls          List items in a container
  mc          Make container
  pull        Pull item from container
  push        Push item to container
  rc          Remove container
  rm          Remove item from container
  stat        Stat item from container
  version     Prints binary version number.

Flags:
      --alsologtostderr                  log to standard error as well as files
      --enable-analytics                 Send usage events to Google Analytics (default true)
  -h, --help                             help for osm
      --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log_dir string                   If non-empty, write log files in this directory
      --logtostderr                      log to standard error instead of files
      --osmconfig string                 Path to osm config (default "$HOME/.osm/config")
      --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
  -v, --v Level                          log level for V logs
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

Use "osm [command] --help" for more information about a command.

OSM Configuration

osm stores credentials necessary to connect to a cloud storage provider in YAML format in $HOME/.osm/config file.
This allows providing commands one time for multiple subsequent operations with a cloud provider.

# AWS S3:
osm config set-context osm-s3 --provider=s3 --s3.access_key_id=<key_id> --s3.secret_key=<secret_key> --s3.region=us-east-1

# TLS secure Minio server
osm config set-context osm-minio --provider=s3 --s3.access_key_id=<minio_access_key> --s3.secret_key=<minio_secret_key> --s3.endpoint=<minio_server_address> --s3.cacert_file=<root_ca_file_path>

# DigitalOcean Spaces:
osm config set-context osm-do --provider=s3 --s3.access_key_id=<key_id> --s3.secret_key=<secret_key> --s3.endpoint=nyc3.digitaloceanspaces.com

# Google Cloud Storage:
osm config set-context osm-gs --provider=google --google.json_key_path=<path_sa_file> --google.project_id=<my_project>

# Microsoft Azure ARM Storage:
osm config set-context osm-az --provider=azure --azure.account=<storage_ac> --azure.key=<key>

# Local Filesystem
osm config set-context osm-local --provider=local --local.path=/tmp/stow

Bucket Operations

# create bucket
osm mc mybucket

# upload file to bucket
osm push -c mybucket ~/Downloads/appscode.pdf a/b/c.pdf

# print uploaded file attributes
osm stat -c mybucket a/b/c.pdf

# download file from bucket
osm pull -c mybucket a/b/c.pdf /tmp/d.pdf

# list bucket
osm ls mybucket

# remove file from bucket
osm rm -c mybucket a/b/c.pdf

# remove bucket (use -f to delete any files inside)
osm rc -f mybucket

Contribution guidelines

Want to help improve OSM? Please start here.

Support

If you have any questions, file an issue or talk to us on our community Slack channel.


The osm binary collects anonymous usage statistics to help us learn how the software is being used and how we can improve it.
To disable stats collection, run the operator with the flag
--enable-analytics=false.


主要指標

概覽
名稱與所有者appscode/osm
主編程語言Go
編程語言Go (語言數: 3)
平台
許可證Apache License 2.0
所有者活动
創建於2016-10-26 05:40:38
推送於2025-02-14 23:16:11
最后一次提交2025-02-14 15:16:03
發布數26
最新版本名稱v0.16.0 (發布於 2021-04-26 23:13:29)
第一版名稱0.1.0 (發布於 2017-03-12 18:32:39)
用户参与
星數166
關注者數8
派生數7
提交數155
已啟用問題?
問題數18
打開的問題數13
拉請求數52
打開的拉請求數0
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?