项目作者: kabbi

项目描述 :
Inferno clone to conquer the world
高级语言: C
项目地址: git://github.com/kabbi/wonderland.git
创建时间: 2012-10-07T13:11:29Z
项目社区:https://github.com/kabbi/wonderland

开源协议:

下载


Cheshire cat

Wonderland

“But I don’t want to go among mad people,” Alice remarked.
“Oh, you can’t help that,” said the Cat: “we’re all mad here. I’m mad. You’re mad.”
“How do you know I’m mad?” said Alice.
“You must be,” said the Cat “or you wouldn’t have come here.”

Welcome to the Wonderland in the middle of Inferno!
We are the DHT-based distributed virtual filesystem based on Vita Nuova’s Inferno Operating System.

Installation

The following steps represent installation process on Linux, if you want to run it on Mac, replace Linux with MacOSX

  1. # Set up environment variables
  2. export INFERNO_ROOT=$(pwd)
  3. export PATH=$INFERNO_ROOT/Linux/386/bin:$PATH
  4. export EMU=-r$INFERNO_ROOT
  5. # Save them for future use
  6. echo "export INFERNO_ROOT=$INFERNO_ROOT" >> ~/.bashrc
  7. echo "export PATH=\$INFERNO_ROOT/Linux/386/bin:\$PATH" >> ~/.bashrc
  8. echo "export EMU=-r\$INFERNO_ROOT" >> ~/.bashrc
  9. # Configure mkconfig
  10. perl -i -pe 's/^ROOT=.*/ROOT=$ENV{INFERNO_ROOT}/m' mkconfig
  11. perl -i -pe 's/^SYSHOST=.*/SYSHOST=Linux/m' mkconfig
  12. perl -i -pe 's/^OBJTYPE=.*/OBJTYPE=386/m' mkconfig
  13. sh makemk.sh
  14. mk nuke
  15. mk install
  16. mk CONF=emu-g install

Basic Usage

Start Inferno:

emu-g

We strongly suggest installing rlwrap and run it this way:
rlwrap -asalt emu-g

Or, if you want GUI, run:
emu

Create a brand new Wonder layer - start a bootstrap node (Hatter)

Here and below, 127.0.0.1 and 1200[?] are the sample address and ports accordingly
The only requirement is that bootstrap nodes should be directly accessible by others

  1. echo > /lib/dht/neis # clear the neighbours list
  2. mount {cheshire udp!127.0.0.1!12001 /lib/dht/neis} /wonderland # mount it on /wonderland
  3. cat /wonderland/cheshire/dht/node # gives you the id of the node - needed later for bootstrap
Start a new node and attach it to Wonder (Alice)

Start a new terminal / Inferno, then:

  1. # id (AABBCCDD), address and port are the connection credentials of any open node in Wonder
  2. echo AABBCCDD udp!127.0.0.1!12001 >> /lib/dht/neis
  3. mount {cheshire udp!127.0.0.1!12002 /lib/dht/neis} /wonderland
So, by now we have at least two nodes in Wonder. Let’s have some fun:
It’s tea-time! Hatter opens a party:
  1. mkdir /tmp/tea
  2. echo export /tmp/tea /devices/teaparty > /wonderland/cheshire/addserver
  3. cd /tmp/tea
  4. echo "Hot tea" > teapot
Alice calls Cheshire and asks him to guide her to Hatter:
  1. cd /wonderland/devices/teaparty
  2. cat teapot # Hooray! We're in!

Disclaimer

All the code in this repository under initial commit
is owned by google code’s Inferno mercurial repository.

License

See file NOTICE for complete license