For this tutorial you will need:
- some free time
- vmware (only if you wish to convert to VMWARE)
Create an empty directory to keep all of the vagrant files and VM
change directory to folder that you created
Fetch and boot up ubuntu clean image.
vagrant init ubuntu/trusty64; vagrant up --provider virtualbox
Now let’s SSH in.
Sudo to gain root privileges
apt install docker.io
Make docker autostart at the boot
update-rc.d docker enable
This section is done. Now let’s move further!
First of all we need to create a Docker to have a persistent storage for our Swift.
docker run -v /srv --name SWIFT_DATA busybox
Now we can start our swift-onlyone docker.
docker run -d --restart=always -p 12345:8080 --volumes-from SWIFT_DATA -t morrisjobke/docker-swift-onlyone
As you see we are redirecting port 8080 from Docker to 12345 on host. So to access the Swift instance you’ll need to use port 12345.
Let’s install the swift client to manage our instance.
apt install python-swiftclient
And check how it works…
swift -A http://127.0.0.1:12345/auth/v1.0 -U test:tester -K testing stat
root@vagrant-ubuntu-trusty-64:/# swift -A http://127.0.0.1:12345/auth/v1.0 -U test:tester -K testing stat Account: AUTH_test Containers: 0 Objects: 0 Bytes: 0 Content-Type: text/plain; charset=utf-8 X-Timestamp: 1463479423.66989 X-Trans-Id: txa41b1f42fe4a4967bead1-00573aec7f X-Put-Timestamp: 1463479423.66989
We are done. Now you have a fully working Swift instance for test purposes.
To use our OpenStackSwift-on-Docker on VMWARE. We need to make a package:
Go to directory where the VM is located (1st step)
And issue “vagrant package” command.
It will stop the VM and make a package of it.
$ vagrant package ==> default: Attempting graceful shutdown of VM... ==> default: Clearing any previously set forwarded ports... ==> default: Exporting VM... ==> default: Compressing package to: /Users/evilroot/vag-new/package.box
It will create a package.box file.
Let’s create a directory called vmware.
and move our package.box file there:
mv package.box vmware
now we can unarchive this file:
cd vmware; tar zxvf package.box
it will produce a couple of files:
$ tar zxvf package.box x ./box-disk1.vmdk x ./box-disk2.vmdk x ./box.ovf x ./vagrant_private_key x ./Vagrantfile
From now on, you can import box.ovf into you vmware. Everything should be working after import is complete.
If you simply want to download the VM that is created you an do that here.
For this VM the details you will need are:
You’ll need to log in into your box and check the IP.
Sample URL: http://172.16.217.205:12345/auth/v1.0
Port is 12345
If you now want to use this the Storage Made Easy Enterprise Cloud Appliance for testing:
- First register and download for the Enterprise Appliance
- Next either follow the tutorial or download the image from the link above
- Run it in the VM and take a note of the IP address and change as appropriate for the endpoint URL
- Run the SME Appliance wizard to connect the instance
Once this is done files can be accessed / added from the web file manager.by