Introduction
News
Search
Documentation
License
Download
Contributors
Contact Us
|
Antiquity
Secure Log For Wide-Area Distributed Storage
|
Tutorials - Moxie (Antiquity Database)
|
- Running Moxie with Antiquity
- Summary of commands:
- Clear temp, kill all existing java processes & create the mount point directory
- rm -rf /tmp/log* /tmp/moxie /tmp/test-* /tmp/*.log
- killall -9 java
- mkdir -p /tmp/moxie/dst
- Navigate to the /impl/ directory & start the administrator antiquity script
- cd ~/antiquity/src/antiquity/gw/impl
- ./start_gw.sh t f 5
- Grep for 'Accept' in the /tmp/test-gw*.log files
- grep Accept /tmp/test-gw*.log | wc
- Note:
- The count returned should be 25
- Navigate to the /ro/ directory
- cd ~/antiquity/src/moxie/ro/
- Generate a key pair if it doesn't already exist (make sure you are in the ~/moxie/ro/ directory):
- ../../../bin/genkey.sh keypair1 1024
- Start the publisher
- ../../../bin/run-java bamboo.lss.DustDevil pub.cfg >& /tmp/pub.log&
- Start moxierofs
- ../../../bin/run-java bamboo.lss.DustDevil moxierofs.cfg >& /tmp/moxierofs.log&
- Do a READ-ONLY file system operation to the mount point
- i.e. ls -l /tmp/moxie/dst; cat /tmp/moxie/dst/*
- If you would like to read what was archived, use read
- ../../../bin/run-java bamboo.lss.DustDevil read.cfg >& /tmp/read.log&
- To unmount the local file system just mounted use:
- Detailed explanation:
- Note:
- This time around we will not be running Moxie on a regular database, instead we will have Antiquity serve as our storage system
- We will still be running the Publisher, Read and MoxieRoFs configuration files just as when we ran Moxie with a database
- However, the files used this time, will NOT have the appending "_db" at the end of them
- i.e. we will be using pub.cfg NOT pub_db.cfg
- Clear temp, kill all existing java processes & make the mount point directory
- rm -rf /tmp/log* /tmp/moxie test-* /tmp/*.log
- killall -9 java
- mkdir -p /tmp/moxie/dst
- Start up antiquity:
- Recall:
- To start antiquity with an administrator and some number of storage servers we:
- Navigate to the directory:
- cd ~/antiquity/src/antiquity/gw/impl/
- Run the antiquity administrator and storage servers:
- Grep for 'Accept' in the /tmp/test-gw*.log files
- grep Accept /tmp/test-gw*.log | wc
- Note:
- The count returned should be 25
- Publisher:
- Function:
- Publisher will write all the blocks of the FsRoot file system into a log, which is stored by a database. We will be using the antiquity directory in this example as our database.
- Note:
- The location of the database files is NOT /tmp/log_db/ as when we ran Moxie with a regular database; rather, they will be distributed between /tmp/test-gw*-db/generic_db directories (the storage for each antiquity gw node).
- Open the pub.cfg file in a text editor:
- i.e. vi pub.cfg
- Navigate down the file until you see "FsRoot"
- Change the value of FsRoot to be the path where the antiquity folder is located in
- i.e. FsRoot /Users/user_name/antiquity
- Note:
- For the value of FsRoot you can not use the ~ character, so the antiquity's path will need to be written out in full
- Edit the Pub.cfg.LogInterface.GatewayPort
- Open /tmp/test-gw1.cfg.RpcServerStage.Port
- Note:
- This notation means, open /tmp/test-gw1.cfg
- Locate in the file
- Locate Port under the
- The value of port should be set to '5562'
- With pub.cfg already opened in an editor:
- Change the value of the GatewayPort to be the value found in /tmp/test-gw1.cfg.RpcServerStage.Port, which should be '5562'
- Follow the instructions at the top of the pub.cfg file (same as below, but not as explicit):
- Navigate to ~/moxie/ro directory (if you aren't already in it):
- cd ~/antiquity/src/moxie/ro
- Remove the log directory of the cache produced by the db:
- Generate a key pair if it doesn't already exist (make sure you are in the ~/moxie/ro/ directory):
- ../../../bin/genkey.sh keypair1 1024
- Run the publisher db
- ../../../bin/run-java bamboo.lss.DustDevil pub.cfg >& /tmp/pub.log&
- MoxieRoFs
- Function:
- Provides a Read Only File System (RoFs) to use on the archived files
- Note:
- moxierofs.cfg DOES use FUSE to locally mount a file system
- Create a local directory that will serve as the mount point
- Open the moxierofs.cfg in a text editor:
- i.e. vi moxierofs.cfg
- Edit the Moxierofs.cfg.LogInterface.GatewayPort
- Open /tmp/test-gw1.cfg.RpcServerStage.Port
- Note:
- This notation means, open /tmp/test-gw1.cfg
- Locate in the file
- Locate Port under the
- The value of port should be set to '5562'
- With moxierofs.cfg already opened in an editor:
- Change the value of the GatewayPort to be the value found in /tmp/test-gw1.cfg.RpcServerStage.Port, which should be '5562'
- Follow the instructions at the top (same as below, but not as explicit):
- The publisher is already running (from the previous step) so we can skip this one
- Navigate to the /moxie/ro/ directory
- Again, we are already in this directory, skip this step
- Assure the key pair exists
- Note:
- Again, we've already done this in the previous step when running the publisher, skip this step
- Mounting the actual file system on to our local directory:
- ../../../bin/run-java bamboo.lss.DustDevil moxierofs.cfg >& /tmp/moxierofs.log&
- Now we can perform file system operations at mount point
- i.e. ls -l /tmp/moxie/dst; cat /tmp/moxie/dst/*
- To unmount the local file system just mounted use:
- Read
- Function:
- Reads the archived directory, written by the publisher in a step-wise fashion based on hash's of the public key used
- Open read.cfg in a text editor:
- i.e. vi read.cfg
- Run the publisher
- Note:
- The publisher is already running (from the previous step) so we can skip this one
- Navigate to the /moxie/ro/ directory
- Note:
- Again, we are already in this directory, skip this step
- Run the command to read the archived file system:
- ../../../bin/run-java bamboo.lss.DustDevil read.cfg >& /tmp/read.log&
- Open the /tmp/read.log file in a text editor
- This displays the file system that was just archived
Last modified 2007/08/17.
|
|