Skip to content

Instantly share code, notes, and snippets.

@alcir
Last active August 29, 2015 13:58
Show Gist options
  • Save alcir/10100101 to your computer and use it in GitHub Desktop.
Save alcir/10100101 to your computer and use it in GitHub Desktop.
leofs SmartOS
3 zones created
zoneA 192.168.0.136
zoneB 192.168.0.136
zoneC 192.168.0.136
In each zone I've configured the fifo repository, then I have installed:
zoneA
pkgin in leo_storage-1.0.0pre3 leo_manager-1.0.0pre3 leo_gateway-1.0.0pre3
zoneB
pkgin in leo_storage-1.0.0pre3 leo_manager-1.0.0pre3
zoneC
pkgin in leo_storage-1.0.0pre3
Manager configuration
---------------------
In the default configuration file (/opt/local/leo_manager/etc/leo_manager.conf) I've changed these lines only.
zoneA
manager.mode = master
manager.partner = manager_1@192.168.0.137
consistency.num_of_replicas = 3
consistency.write = 2
consistency.read = 1
consistency.delete = 2
nodename = manager_0@192.168.0.136
zoneB
manager.mode = slave
manager.partner = manager_0@192.168.0.136
nodename = manager_1@192.168.0.137
Manager start
-------------
On zoneA and zoneB
svcadm enable svc:/pkgsrc/epmd:default
svcadm enable svc:/leofs/manager:default
Storage configuration
---------------------
In the default configuration file (/opt/local/leo_storage/etc/leo_storage.conf) I've changed these lines only.
zoneA
managers = [manager_0@192.168.0.136, manager_1@192.168.0.137]
nodename = storage_0@192.168.0.136
zoneB
managers = [manager_0@192.168.0.136, manager_1@192.168.0.137]
nodename = storage_1@192.168.0.137
zoneC
managers = [manager_0@192.168.0.136, manager_1@192.168.0.137]
nodename = storage_2@192.168.0.138
Storage start
-------------
On zoneA, zoneB and zoneC
svcadm enable svc:/leofs/storage:default
Issue start command
-------------------
telnet zoneA 10010
Connected to localhost.
Escape character is '^]'.
start
Generating RING...
Generated RING
OK 33% - storage_0@192.168.0.136
OK 67% - storage_2@192.168.0.138
OK 100% - storage_1@192.168.0.137
OK
Gateway configuration
---------------------
In the default configuration file (/opt/local/leo_gateway/etc/leo_gateway.conf) I've changed these lines only.
zoneA
managers = [manager_0@192.168.0.136, manager_1@192.168.0.137]
nodename = gateway_0@192.168.0.136
Gateway start
---------------------
On zoneA
svcadm enable svc:/leofs/gateway:default
Check satus
-----------
telnet zoneA 10010
status
[System config]
System version : 1.0.0-pre3
Cluster Id : cluster_1
DC Id : dc_1
Total replicas : 3
# of successes of R : 1
# of successes of W : 2
# of successes of D : 2
# of DC-awareness replicas : 0
# of Rack-awareness replicas : 0
ring size : 2^128
Current ring hash : be1ce5f6
Prev ring hash : be1ce5f6
[Node(s) state]
-------+------------------------------+--------------+----------------+----------------+----------------------------
type | node | state | current ring | prev ring | updated at
-------+------------------------------+--------------+----------------+----------------+----------------------------
S | storage_0@192.168.0.136 | running | be1ce5f6 | be1ce5f6 | 2014-04-08 07:40:47 +0000
S | storage_1@192.168.0.137 | running | be1ce5f6 | be1ce5f6 | 2014-04-08 07:40:47 +0000
S | storage_2@192.168.0.138 | running | be1ce5f6 | be1ce5f6 | 2014-04-08 07:40:47 +0000
G | gateway_0@192.168.0.136 | running | be1ce5f6 | be1ce5f6 | 2014-04-08 07:44:40 +0000
At last
-------
create-user pino password
add-endpoint hostname.of.zoneA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment