LoginSignup
15
16

More than 5 years have passed since last update.

vagrant-swift-all-in-oneを使ってみる

Last updated at Posted at 2014-09-28

某所でのLTネタとして、OpenStack Swiftを使って即席クラウドストレージを作ってみました。VirtualBoxVagrantを使って、同一LAN内からアクセス可能なSwiftサーバを用意します。環境はWindows7です。

Swift-All-In-One

SwiftStackが公開している vagrant-swift-all-in-one を利用して、Swiftサーバを構築します。

https://github.com/swiftstack/vagrant-swift-all-in-one
上記のリポジトリをZipでダウンロードして、適当なフォルダに解凍します。

Swiftサーバ用の固定IPとブリッジ接続の設定をVagrantfileに追加しておきます。

Vagrantfile
Vagrant.configure("2") do |config|
+ config.vm.network :public_network, ip: "192.168.0.1", netmask: "255.255.255.0", gateway: "192.168.0.254", bridge:"eth0"
end

コマンドプロンプトから解凍したフォルダへ移動してVMを起動します。

cd vagrant-swift-all-in-one
vagrant up

VM起動後、Chefが実行されてSwiftを自動的にインストールしてくれます。

起動後の確認

インストールが終了したら、ユーザ名:vagrant、パスワード:vagrantで127.0.0.1:2222にSSH接続し、適当なファイルをアップロード/ダウンロードして、Swiftが動作していることを確認します。

echo "awesome" > test
swift upload test test
swift download test test -o -

CloudBerryCyberduckといったクライアントを利用すればGUIでSwiftにアクセスできます。
testユーザでアクセスする場合の認証情報は以下を利用します。


続き→django-swiftbrowserを使ってみる

15
16
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
15
16