Configure FLUs and chains with "rc.d" style configuration #56

Merged
slfritchie merged 43 commits from slf/flu-config-rcd-style into master 2015-12-18 06:46:05 +00:00

43 commits

Author SHA1 Message Date
Scott Lystig Fritchie
d602663060 Ignore RUNLOG* 2015-12-18 13:43:18 +09:00
Scott Lystig Fritchie
0922def0d6 s/verb/term/gi 2015-12-18 11:50:15 +09:00
Scott Lystig Fritchie
bb0e67f6e0 Add doc/flu-and-chain-lifecycle.org 2015-12-17 21:33:30 +09:00
Scott Lystig Fritchie
51a05ba770 Fix dialyzer complaints in machi_lifecycle_mgr.erl 2015-12-17 12:44:10 +09:00
Scott Lystig Fritchie
1d1bfadb96 Corrections from review 2015-12-17 12:31:32 +09:00
Scott Lystig Fritchie
f98b4da45b Add 'quick admin' config management: better file handling 2015-12-16 19:05:25 +09:00
Scott Lystig Fritchie
463d20a9fd Add 'quick admin' config management tool/hack 2015-12-16 16:41:11 +09:00
Scott Lystig Fritchie
6f077fbb62 New machi_lifecycle_mgr_test, AST spec -> running FLUs & chains works! 2015-12-11 19:07:00 +09:00
Scott Lystig Fritchie
e55115fdba All EUnit tests in machi_lifecycle_mgr_test pass! 2015-12-11 17:28:27 +09:00
Scott Lystig Fritchie
009bad230f WIP: change internal types for most strings -> atom to match chmgr internal use 2015-12-11 16:36:18 +09:00
Scott Lystig Fritchie
6b7d871ada WIP: diff in progress 2 2015-12-11 16:26:13 +09:00
Scott Lystig Fritchie
1db232db1b WIP: diff in progress 2015-12-11 15:33:31 +09:00
Scott Lystig Fritchie
3826af8ee2 WIP: dict -> gb_trees, 2 of 2 2015-12-11 13:17:33 +09:00
Scott Lystig Fritchie
df8eea8c10 WIP: dict -> gb_trees, 1 of 2 2015-12-11 12:54:54 +09:00
Scott Lystig Fritchie
61eae1300f WIP: finish basic 'run', add negative tests 2015-12-11 12:43:38 +09:00
Scott Lystig Fritchie
3ee3de1aaf WIP: end of day 2015-12-10 23:44:27 +09:00
Scott Lystig Fritchie
6a5c590ad1 WIP: AST change {chain,...} thingie 2015-12-10 23:05:08 +09:00
Scott Lystig Fritchie
c37f23d97a WIP: 'Run' AST thingie ha, take that, wheel! 2015-12-10 22:53:17 +09:00
Scott Lystig Fritchie
9cec53eea6 Yet another strawman AST 2015-12-10 19:18:25 +09:00
Scott Lystig Fritchie
9472bad37b Clean up test errors 2015-12-10 15:57:35 +09:00
Scott Lystig Fritchie
cb706f0d23 Add test/machi_lifecycle_mgr_test.erl 2015-12-10 15:20:56 +09:00
Scott Lystig Fritchie
61ef7739cd Modify chain mostly works, better 2015-12-10 00:12:34 +09:00
Scott Lystig Fritchie
b0a9e65ca2 WIP: trying to shut down entire chain, but buggy, derp 2015-12-09 23:00:27 +09:00
Scott Lystig Fritchie
95e2df304e WIP: minor cleanup 2015-12-09 22:25:43 +09:00
Scott Lystig Fritchie
7f25fcc8f8 Modify chain mostly works 2015-12-09 19:02:16 +09:00
Scott Lystig Fritchie
cd9bf9eeab Modify chain mostly works, 2 TODOs remain 2015-12-09 18:17:26 +09:00
Scott Lystig Fritchie
2871f8397c WIP: modify chain still a bit broken 2015-12-09 17:19:02 +09:00
Scott Lystig Fritchie
65eec61f82 Basic stuff to add new flus via 'pending' dir 2015-12-09 14:48:46 +09:00
Scott Lystig Fritchie
7301c8308e Clarify the initial docs, thanks @mrallen1! 2015-12-09 14:07:27 +09:00
Scott Lystig Fritchie
f23e500993 WIP comments 2015-12-09 11:32:05 +09:00
Scott Lystig Fritchie
69280bfb4f Fix typo/thinko: correct chain name @ bootstrap 2015-12-08 22:19:26 +09:00
Scott Lystig Fritchie
0fc7bc74b7 EDoc fixes 2015-12-08 22:05:11 +09:00
Scott Lystig Fritchie
8285899dba Bootstrap chain @ app init: done, with an example.
For example:

% make clean
% make stage

And then configure 3 FLUs:

    % echo '{p_srvr, a, machi_flu1_client, "localhost", 39000, []}.' > rel/machi/etc/flu-config/a
    % echo '{p_srvr, b, machi_flu1_client, "localhost", 39001, []}.' > rel/machi/etc/flu-config/b
    % echo '{p_srvr, c, machi_flu1_client, "localhost", 39002, []}.' > rel/machi/etc/flu-config/c

And then configure a chain to use 2 of those 3 FLUs:

    % echo '{chain_def_v1,c1,ap_mode,[{p_srvr,a,machi_flu1_client,"localhost",39000,[]},{p_srvr,b,machi_flu1_client,"localhost",39001,[]}],[],[]}.' > rel/machi/etc/chain-config/c1

... then start Machi e.g.

    % ./rel/machi/bin/machi console

... you should see the following console messages scroll by (including a :

    =PROGRESS REPORT==== 8-Dec-2015::22:01:44 ===
              supervisor: {local,machi_flu_sup}
                 started: [{pid,<0.145.0>},
                           {name,a},
                           {mfargs,
                               {machi_flu_psup,start_link,
                                   [a,39000,"./data/flu/a",[]]}},
                           {restart_type,permanent},
                           {shutdown,5000},
                           {child_type,supervisor}]

    [... and also for the other two FLUs, including a bunch of progress
         reports for processes that started underneath that sub-supervisor.]

    22:01:44.446 [info] Running FLUs: [a,b,c]
    22:01:44.446 [info] Running FLUs at epoch 0: [a,b,c]
    22:01:44.532 [warning] The following FLUs are defined but are not also members of a defined chain: [c]
2015-12-08 21:57:29 +09:00
Scott Lystig Fritchie
37ac09a680 Rename src/machi_chain_bootstrap.erl -> src/machi_lifecycle_mgr.erl 2015-12-08 17:46:11 +09:00
Scott Lystig Fritchie
3391c89818 Clean up verbosity of nonunanimous_setup_and_fix_test2() 2015-12-08 16:29:56 +09:00
Scott Lystig Fritchie
27e8a31307 Fix fitness timing problem with short-circuit +trigger_early_adjustment/2 2015-12-08 15:27:47 +09:00
Scott Lystig Fritchie
ef10ebed22 WIP: now trying to diagnose fitness server bug? 2015-12-08 14:50:16 +09:00
Scott Lystig Fritchie
1bc9033076 Yay, all tests pass! 2015-12-07 22:15:23 +09:00
Scott Lystig Fritchie
38e63e8181 Add & remove, mostly working (2 eunit tests broken) 2015-12-07 21:52:27 +09:00
Scott Lystig Fritchie
5aeaf872d9 WIP: machi_chain_manager1:set_chain_members() API change, all tests pass, yay 2015-12-07 14:41:56 +09:00
Scott Lystig Fritchie
3c880dc437 WIP: find 1st overlapping FLU in any #chain_def_v1{} 2015-12-04 17:47:18 +09:00
Scott Lystig Fritchie
a7ffef6b8e Add src/machi_chain_bootstrap.erl 2015-12-04 17:18:15 +09:00
Scott Lystig Fritchie
cf0829b934 Add rc.d style config dir for FLU server startup 2015-12-04 16:37:05 +09:00