{"action":"created","issue":{"url":"https://api.github.com/repos/basho/machi/issues/56","labels_url":"https://api.github.com/repos/basho/machi/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/basho/machi/issues/56/comments","events_url":"https://api.github.com/repos/basho/machi/issues/56/events","html_url":"https://github.com/basho/machi/pull/56","id":122470806,"number":56,"title":"Configure FLUs and chains with \"rc.d\" style configuration","user":{"login":"slfritchie","id":75320,"avatar_url":"https://avatars.githubusercontent.com/u/75320?v=3","gravatar_id":"","url":"https://api.github.com/users/slfritchie","html_url":"https://github.com/slfritchie","followers_url":"https://api.github.com/users/slfritchie/followers","following_url":"https://api.github.com/users/slfritchie/following{/other_user}","gists_url":"https://api.github.com/users/slfritchie/gists{/gist_id}","starred_url":"https://api.github.com/users/slfritchie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slfritchie/subscriptions","organizations_url":"https://api.github.com/users/slfritchie/orgs","repos_url":"https://api.github.com/users/slfritchie/repos","events_url":"https://api.github.com/users/slfritchie/events{/privacy}","received_events_url":"https://api.github.com/users/slfritchie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-16T10:17:49Z","updated_at":"2015-12-18T04:13:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/basho/machi/pulls/56","html_url":"https://github.com/basho/machi/pull/56","diff_url":"https://github.com/basho/machi/pull/56.diff","patch_url":"https://github.com/basho/machi/pull/56.patch"},"body":"Taking inspiration from BSD init's \"rc.d\" style configuration, this PR moves FLU config (which FLUs to start at app start time), chain bootstrapping (the first config before Humming Consensus manages the chain), and chain reconfiguration (adding/removing chain members) into the new style.\r\n\r\nAlso added `machi-admin` interface (as a strawman/temporary proposal) to provide a declarative configuration method for adding FLUs, adding chains, and reconfiguring chains.  For example:\r\n\r\n    % make\r\n    % make stage\r\n    % ./rel/machi/bin/machi start\r\n    \r\n    % ./rel/machi/bin/machi-admin quick-admin-apply ./priv/quick-admin-examples/000 localhost\r\n    ok\r\n    \r\n    % ./rel/machi/bin/machi-admin quick-admin-apply ./priv/quick-admin-examples/001 localhost\r\n    Result: ok\r\n    \r\n    % ./rel/machi/bin/machi-admin quick-admin-apply ./priv/quick-admin-examples/002 localhost\r\n    Result: ok\r\n    \r\n    % ./rel/machi/bin/machi attach\r\n    Remote Shell: Use \"Ctrl-C a\" to quit. q() or init:stop() will terminate the machi node.\r\n    Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]\r\n    \r\n    Eshell V6.4  (abort with ^G)\r\n    (machi@127.0.0.1)1> supervisor:which_children(machi_flu_sup).\r\n    [{f6,<0.334.0>,supervisor,[]},\r\n     {f5,<0.309.0>,supervisor,[]},\r\n     {f4,<0.285.0>,supervisor,[]},\r\n     {f3,<0.183.0>,supervisor,[]},\r\n     {f2,<0.161.0>,supervisor,[]},\r\n     {f1,<0.138.0>,supervisor,[]}]\r\n    (machi@127.0.0.1)2>\r\n\r\nTo examine the two new chains, `c1` and `c2` that were created by those commands:\r\n\r\n    % ls -l rel/machi/etc/quick-admin-archive\r\n    total 24\r\n    -rw-rw-r--  1 fritchie  staff   25 Dec 16 19:02 000001\r\n    -rw-rw-r--  1 fritchie  staff  119 Dec 16 19:02 000002\r\n    -rw-rw-r--  1 fritchie  staff  119 Dec 16 19:02 000003\r\n    \r\n    % grep chain, rel/machi/etc/quick-admin-archive/*\r\n    rel/machi/etc/quick-admin-archive/000002:{chain,c1,[f1,f2,f3],[]}.\r\n    rel/machi/etc/quick-admin-archive/000003:{chain,c2,[f4,f5,f6],[]}.\r\n\r\n... and ...\r\n\r\n    (machi@127.0.0.1)3> machi_projection_store:read_latest_projection(f1_pstore, private).\r\n    {ok,#projection_v1{\r\n            epoch_number = 1113,\r\n            epoch_csum =\r\n                <<72,224,87,205,221,235,84,78,94,99,3,144,245,144,39,194,\r\n                  119,159,223,74>>,\r\n            author_server = f1,chain_name = c1,\r\n            all_members = [f1,f2,f3],\r\n            witnesses = [],\r\n            creation_time = {1450,260189,548973},\r\n            mode = ap_mode,\r\n            upi = [f1,f2,f3],\r\n            repairing = [],down = [],\r\n            dbg = [d_foo1,{ps,[]},{nodes_up,[f1,f2,f3]}],\r\n    [....]\r\n"},"comment":{"url":"https://api.github.com/repos/basho/machi/issues/comments/165668693","html_url":"https://github.com/basho/machi/pull/56#issuecomment-165668693","issue_url":"https://api.github.com/repos/basho/machi/issues/56","id":165668693,"user":{"login":"mrallen1","id":204728,"avatar_url":"https://avatars.githubusercontent.com/u/204728?v=3","gravatar_id":"","url":"https://api.github.com/users/mrallen1","html_url":"https://github.com/mrallen1","followers_url":"https://api.github.com/users/mrallen1/followers","following_url":"https://api.github.com/users/mrallen1/following{/other_user}","gists_url":"https://api.github.com/users/mrallen1/gists{/gist_id}","starred_url":"https://api.github.com/users/mrallen1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrallen1/subscriptions","organizations_url":"https://api.github.com/users/mrallen1/orgs","repos_url":"https://api.github.com/users/mrallen1/repos","events_url":"https://api.github.com/users/mrallen1/events{/privacy}","received_events_url":"https://api.github.com/users/mrallen1/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T04:13:57Z","updated_at":"2015-12-18T04:13:57Z","body":":+1: "}}