Riak on SmartOs outside Joyent SDC

Here is a quick step by step on how to set up a test Riak cluster on SmartOs outside Joyent Smartdatacenter.

The first step is to author a json file describing the VM. Here is mine as an example:
{
"alias": "riak1",
"hostname": "riak1",
"brand": "joyent",
"dataset_uuid": "399e09fc-c448-11e1-b3c8-a3d517dfbb07",
"max_physical_memory": 4096,
"quota": 0,
"nics": [
{
"nic_tag": "admin",
"ip": "10.50.XX.XX",
"netmask": "255.255.255.0",
"gateway": "10.50.XX.XX"
}
]
}

It is almost the minimal file. Let’s have a look at the different parts:

  • alias: an alias to your VM, it appears when you do vmadm list in the global zone.
  • hostname: the name of the VM, it appears when you log into it instead of the UUID.
  • brand: stick with joyent as it is a SmartOs VM.
  • dataset_uuid: the uuid of the Joyent dataset to use. To know what to put there, see Stu Radnidge’s explanations.
  • max_physical_memory: in MiB.
  • quota: the size of the disk available for the VM.
  • nics: the network interface:
    • nic_tag: if you are going to only use one, put “admin”.
    • ip, netmask, gateway: although the docs state you can put dhcp there, it does not quite work: it ip obtained by dhcp will not be put in the several config files and your VM will not work properly.

Write at least three of them, changing the names and ips to make them different and push them to the GZ.
You can then create your VMs using vmadm create -f riak1.json and log into them using zlogin and the uuid. It is the only way at this point as the root user does not have a password.
With riak ping and riak version, you will see that riak is running, but an old version (1.1.4).
Here is the way to upgrade to the latest version:

  1. stop riak: svcadm disable riak (sometimes, it doesn’t work and you required to do a riak stop.)
  2. get the tar.gz from Basho’s website. 1.2.1 is at http://downloads.basho.com.s3-website-us-east-1.amazonaws.com/riak/1.2/1.2.1/smartos/11/riak-1.2.1-SmartOS-i386.tgz
  3. remove the current riak package: pkg_delete riak
  4. add the newer package: pkg_add riak-1.2.1-SmartOS-i386.tgz.
  5. modify app.config (located in /opt/local/etc/riak) to fit your installation:
    1. replace 127.0.0.1 by the correct ip in three location.
    2. if you want to use 2i, replace the storage_backend value by riak_kv_eleveldb_backend. 
  6. modify vm.argsto fit your installation:
    1. set -name to riak@<yourip>
    2. set -setcookie to any value, but it has to be the same on all the VMs that will join the cluster.
  7. as it is a fresh installation, remove the ring folder in /var/db/riak to take into account the modifications of vm.args.
  8. start riak with svcadm enable riak-epmd and svcadm enable riak. Sometimes, you may need to use riak start.
  9. it may take a while. You can check that something is happening by checking prstat.

Once you have done that to all the VMs you want to have in your cluster, you can have them form a cluster. On one of the node, issue a riak-admin cluster join riak@,anothernodeip> for each of the other nodes you want to have in your cluster. The command riak-admin status | grep ring_members should echo an array of all the your cluster nodes:
[root@riak1 ~]# riak-admin status | grep ring_members
ring_members : ['riak@10.50.XX.X1','riak@10.50.XX.X2','riak@10.50.XX.X4']

Project: create an integral back for Mamiyas

L’année dernière, j’ai bricolé le RB-Roid à partir d’un de mes Mamiya RB67 et d’un Polaroid 2000. Au final, je ne suis pas satisfait du résultat: il y a des fuites de lumière, ce n’est pas assez plan et c’est impossible de mettre au point correctement. J’ai quand même réussi une ou deux photos avec. Pas vraiment plus.
The lady of my dreams
Cette année, je remets ça, avec comme challenge de résoudre ces trois problèmes et de le rendre interchangeable pour le mettre sur mes RB67 et sur mon Universal Press.

J’ai pour cela acheter un dos Polaroid pour film intégral que je vais adapter.
Integral back

Last year, I built the RB-Roid from one of my Mamiya RB67 and a Polaroid 2000, but I am not completely satisfied with it: there are light leaks, it isn’t plan enough and it’s impossible to focus correctly. Still, I did some good photos with it. At least two maybe.
RB-roid seen by Polaroid 1200si
This year, I am going to review the design and improve it. It will have to solve the three main issues and I also want to make it removable, so I can fit it either on an RB body or an Universal body. These are the challenges.
To achieve these, I bought an integral back that I will need to adapt.Integral Back

RB-roid, ça marche !

Première image prise avec mon RB-roid: un Mamiya RB67 avec un dos fait maison à partir d’un polaroid 2000. Ca me permet d’utiliser des films SX70 et 600. Par contre, l’épaisseur n’est pas bonne, il va falloir que j’ajuste à la mise au point…
Ici, j’ai utilisé un pack de PX600 First Flush de The Impossible Project. L’image est un peu solarisée, sans doute à cause de la sensibilité de ces films en début de développement.

Charles

Common people have common sense. Amenez-moi un homme commun aurait dit Marx (Groucho, pas Karl). Charles était un homme commun qui essayait juste de vivre sa vie dans le bon sens. Souvent, Charles trouvait que le monde était vraiment devenu n’importe quoi. Même s’il aurait aimé être chasseur de fantôme, Charles n’était pas ce qu’on… Read more.