forked from bahamapascal/ICCR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
942 lines (644 loc) · 22.9 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
Sun: 11/20/2016
Made ~/projects/iccr
Created github repo: https://github.com/strongwares/iccr
git clone https://github.com/strongwares/iccr.git
~/projects/iccr/iccr$ ls
README.md
git config --global user.email "strongwares@gmail.com"
git config --global user.name "strongwares"
git remote add origin https://github.com/strongwares/<>.git
git add <>
git commit -m "..."
git push -u origin master
sudo apt-get install maven
which mvn
/usr/bin/mvn
dana@optiPlex-780-1-ubuntu:~/projects/iccr/iccr$ mvn --version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-34-generic", arch: "amd64", family: "unix"
Started upgrade to 16.04
Defined rest service api: /rs/app/config/{id}
Checked in first firefly-swarm packaging of uberjar with
---------------------
Mon 11/21/16
Added global gitignore:
~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
Added check for api-access-key
Add properties source to rest impl
Add installer/iccr-scripts
Added bash script to start iccr, setting env var, setting cmd line
java env setting for prop file dir: iccrConfDir=/opt/iccr/conf
define props:
for passing to cmd line:
iccrDir=/opt/iccr
iccrConfDir=/opt/iccr/conf
iccrLogDir=/opt/iccr/logs
iccrLibDir=/opt/iccr/lib
iccrBinDir=/opt/iccr/bin
iccrLogLevel=DEBUG
for iccr.prop:
iccrStartAtStartup=false
iccrStartIotaAtStartup=false
iccrStopIotaAtShutdown=false
iccrPortNumber=14266
iotaDownloadLink=http://85.93.93.110
iotaDownloadFilename=IRI.jar
iotaDir=/opt/iota
iotaStartCmd=java -jar IRI.jar
iotaPortNumber=14265
iotaNeighbors=al,bill,fred
iotaNeighbor.key.al=al
iotaNeighbor.ip.al=10.0.0.1
iotaNeighbor.name.al=Al
iotaNeighbor.descr.al=al's node
iotaNeighbor.active.al=true
iotaNeighborRefreshTime=10
Deliver neighbors as neighbors dto
Finish /app/config update operations
checked in
-----------
Tue: 11/22/2016
Staging dist:
cp installer/property-files/src/main/resources/iccr.properties /opt/iccr/conf
cp installer/iccr-scripts/src/main/scripts/iccr-ctl /opt/iccr/bin/
cp packager/swarm/target/iccr-swarm.jar /opt/iccr/lib/iccr.jar
Finish properties: update writes out prop file
Checked in
Changed iota-api to iota-agent module
Delete iccr-agent
Delete iota-api
Checked in
Added iotaDownloadLink prop
Created ActionFactory:
install
start
stop
deletedb
delete
Checked in
------------
Wed: 11/23/2016
Add us for configurable IOTA dld link: us 26 iotaDownloadLink
Add us for configurable IOTA dld link: us 27 iotaDownloadFilename
Added prop iotaDownloadFilename=IRI.jar
AbstractAction validate preconditions
us 4 iccr install iota
rest api: post rs/iota/cmd/{install}
new us 28 Iota Status Action
StatusAction
validate props iotaDir
execution: file exists, is running, answers query
checked in
-----------
Thu 11/24/16
Locale values supported by jvm: http://www.oracle.com/technetwork/java/javase/java8locales-2095355.html
i18n tutorial: http://docs.oracle.com/javase/tutorial/i18n/index.html
Locale properties
# Possible values for languages (i.e. English, French, German, Spanish, Italian) are: en, fr, de, sp, it
# See http://www.oracle.com/technetwork/java/javase/java8locales-2095355.html
#iccrLanguageLocale=de
iccrLanguageLocale=en
# Possible values for English speaking countries (i.e. US, GreatBritain) are: US, GB, etc
# Possible values for German speaking countries (i.e. Germany, Austria, Switzerland) are: DE, AT, CH
# See http://www.oracle.com/technetwork/java/javase/java8locales-2095355.html
#iccrCountryLocale=DE
iccrCountryLocale=US
Localizer
MessagesBundle_de_DE.properties
MessagesBundle_en_US.properties
Action execute framework
ActionProcessFactory
OsProcessAction
ProcessBuilder: args, env, file
ProcessBuilder for status check: ps fax | grep IRI
curl -H "Content-Type: application/json" -X POST http://localhost:14266/iccr/rs/iota/cmd/status
2016-11-24 17:24:47,457 INFO [stdout] (default task-3) starting to execute process command (iotastatus): ps fax | grep IRI | grep -v grep
2016-11-24 17:24:47,700 INFO [stdout] (default task-3) exception trying to execute an action (name: iotastatus, cmd: ps fax | grep IRI | grep -v grep): Cannot run program "ps fax | grep IRI | grep -v grep": error=2, No such file or directory
2016-11-24 17:24:47,702 INFO [stdout] (default task-3) exception trying to execute an action (name: iotastatus, cmd: ps fax | grep IRI | grep -v grep): Cannot run program "ps fax | grep IRI | grep -v grep": error=2, No such file or directory
checked in
New checkiotastatus.bash script
new dir to dld to /opt/iccr/tmp
new dir make backup copies to /opt/iccr/bak
Pass iccrDir jvm env to iccr instead of conf dir
iotastatus only do osprocess if !win
use apache Http components framework
Http/HttpMethod HttpGet HttpPost
iotastatus do iotainfo httpaction if win
download iota action
Checked in
-----------
Fri 11/25/16
http get release conn after read
http post release conn after read
update i13n install iota action
install iota action/process
write out downloaded iri jar
us 5 iccr remember iota install info: persistor captures event csv
persist iota dld info: audit dir, iota-event.csv:
<date,<event>,<data>,<data2>
<date>,download,<dld link>,<filepath>
<date>,fail download,<dldlink>,<msg>
<date>,fail download,<filepath>,<msg>
<date>,install,<filepath>,<iri.jar>
<date>,fail install,<filepath>,<msg>
<date>,stop,?,?
<date>,fail stop,?,<msg>
<date>,start,<cmd>
<date>,fail start,?,<msg>
Get start cmd or iri.jar in start cmd for putting in persistence in install iota action
InstallAction:
validate props iotaDir, iotaDownloadLink, iotaDownloadFilename
get Iota status
download
write action status strings to a place that a rest api long poll can query for scrolling log window in UI
persist events, version, and date
process and script to install new iri <dldFilePath>: copy iotaDir/iriFileName to /opt/iccr/bak/iri.jar.timestamp; cp dldFilePath to iriFilePath
and make backup copy of iota
start iota
startiota.bash
gets startCmd from iccr.props
gets portNum from iccr.props
could get jvm args from iccr.props
stores pid
stop Iota if necessary:
process and script to nicely kill
need pid
Sync dld file name Iri-version.jar.time with name of jar in start cmd (java -jar iri.jar)
start iota action: from script that picks up the configured prop
? on start, first verify if the iri.jar exists in iota dir
us 7 iccr start iota
rest api: post /rs/iota/cmd/{start}
StartAction: validate props iotaDir, iotaStartCmd, iotaPortNumber
us 8 iccr stop iota
rest api: post /rs/iota/cmd/{stop}
StopAction: validate props iotaDir
script: stopiota.bash
----
Sat 11/26/2016
new AgentUtil utilities
install iri first validates iota dir exists
startiota first validates iota dir exists
Emit newline to iota-events.csv
Checked in
install action do file ops instead of spawning osprocess
fixed stopiota.bash
fixed startiota.bash
start iota log event
stop iota log event
test:
status
stop
start
status
stop
start
install
status
stop
install
status
start needs to check if already running
status
start
start
status
stop
status
start
restart
new restart command
checked in
write localized date to iota-event.csv
fill out delete action: stop, delete IRI.jar
us 10 iccr delete iota
rest api: post /rs/iota/cmd/{delete}
DeleteAction:
validate props iotaDir
fill out deletedb: stop, delete *.iri
us 9 iccr delete iota db
rest api: post /rs/iota/cmd/{deletedb}
DeletedbAction:
validate props iotaDir
deletedb
start
delete
start -> fail
download
status
start
stop
start
restart
checked in
us 11 get iota node info
rest api: get /rs/iota/nodeinfo
agent
us 12 get iota nbrs
rest api: get /rs/iota/neighbors
agent
stop
getNodeInfo
getNeighbors
start
getNodeInfo
getNeighbors
checked in
fixed addding payload to iota cmd
checked in
action to add neighbors to iota
add neighbors in start action
checked in
------
Sat:12/3/16
add separate nbr list get/set rest resources
fixed setting nbr list
checked in
send dld link and filename as actionprops to install iota cmd
checked in
--------
Sun: 12/4/2016
on delete db, if iota was running, restrt it after delete
after iota stop added pause and status check
checked in
support for api key
checked in
added remove nbrs cmd and dto
on set nbrs config, remove current config nbrs, update props, then add nbrs
fixed check for empty nbrs when starting
checked in
---------
Mon: 12/5/2016
support delete ICCR Event log
checkin
delivered 1.0.0
2201 cd /opt/iccr/
2202 ls
2203 ls bak
2204 ls bin
2205 ls conf
2206 emacs -nw conf/iccr.properties
2207 ls data/
2208 rm data/iota-event.csv
2209 ls download/
2210 rm download/*
2211 ls lib/
2212 ls logs/
2213 rm logs/iccr.log
2214 ls tmp/
2215 pwd
2216 emacs -nw bin/iccr-ctl
2217 bin/iccr-ctl
2218 ps
2219 ps -f
2220 kill 11167
2221 emacs -nw bin/iccr-ctl
2222 bin/iccr-ctl
2223 ps
2224 emacs -nw bin/iccr-ctl
2225 bin/iccr-ctl
2226 ps
2227 ps -f
2228 tail -f logs/iccr.log
2229 ls
2230 ps
2231 kill 11521
2232 ps
2233 tail -f logs/iccr.log
2234 rm logs/iccr.log
2235 ls
2236 cd ..
2237 ls
2238 tar -czvf iccr.tgz iccr
2239 tar -czvf ~/iccr.tgz iccr
tar -czvf ~/iccr.tgz iccr
iccr/
iccr/bin/
iccr/bin/stopiota.bash
iccr/bin/iccr-ctl
iccr/bin/installiri.bash
iccr/bin/startiota.bash
iccr/bin/checkiotastatus.bash
iccr/data/
iccr/download/
iccr/lib/
iccr/lib/iccr.jar
iccr/conf/
iccr/conf/iccr.properties
iccr/conf/MessagesBundle_en_US.properties
iccr/conf/MessagesBundle_de_DE.properties
iccr/bak/
iccr/tmp/
iccr/logs/
------------
Tue: 12/6/2016
added changelog.txt
Change default value for IOTA download link: iotaDownloadLink=http://188.138.57.93
Change default value for IOTA download filename: iotaDownloadFilename=IRI-1.1.1.1.jar
Added numAt, numIt, numNt fields to NeighborDto
Changed iccr start cmd in start script to redir to log and run in background and capture pid
Fixed iotaGetNeighbors cmd
Parse getNeighbors response into dto:
getIotaNeighbors, content: {"neighbors": [{"address": "/10.0.0.0:14265", "numberOfAllTransactions": 0, "numberOfNewTransactions": 0, "numberOfInvalidTransactions": 0}], "duration": 1}
Parse getNodeInfo response into dto:
getIotaNodeInfo, content: {"appName": "IRI", "appVersion": "1.1.0", "jreAvailableProcessors": 2, "jreFreeMemory": 47309536, "jreMaxMemory": 883949568, "jreTotalMemory": 60293120, "latestMilestone": "999999999999999999999999999999999999999999999999999999999999999999999999999999999", "latestMilestoneIndex": 0, "latestSolidSubtangleMilestone": "999999999999999999999999999999999999999999999999999999999999999999999999999999999", "latestSolidSubtangleMilestoneIndex": 0, "neighbors": 1, "packetsQueueSize": 0, "time": 1481092954120, "tips": 1, "transactionsToRequest": 0, "duration": 1}
Fixed getNeighbor and getNodeInfo IOTA API calls
Bumped iccr version to 1.0.1-SNAPSHOT
pass iota nbr and nodeinfo response text back to client
log exceptions that are caught by rest resource
Set nbrs in rest API support direct set of neighbors
finish installer/iccr-scripts
finish installer/property-files
load api access key into resource impl
Check iccr startup logging error: removed logging directive
checked in
-------------
Wed: 12/7/2016
IOTA log console api
checked in
-------------
Thu: 12/8/2016
Added start, stop, status command line options to iccr-ctl
Added support for command line options to iccr-ctl when starting: nossl debug or info
cp ~/projects/pki/icc/server/stores/iccr-ts.jks installer/property-files/src/main/resources/
cp ~/projects/pki/icc/server/stores/iccr-ks.jks installer/property-files/src/main/resources/
Enable https in swarm:
https://developer.jboss.org/thread/266633?_sscc=t
HTTPS can be disabled by passing nossl on commandline when launching iccr
Checked in
--------------
Fri: 12/9/2016
Do single port
Fixed hardcoding of port number in iccr-ctl
Fix hardcoding of keystore
Added restart to iccr-ctl script
checked in
Release checklist:
mvn clean install
clean deployed dir:
/opt$ sudo mv iccr iccr-pre-1.0.1
mkdir new iccr dir:
/opt$ sudo mkdir /opt/iccr
/opt$ sudo chown dana:dana /opt/iccr
/opt$ mkdir /opt/iccr/bak
/opt$ mkdir /opt/iccr/bin
/opt$ mkdir /opt/iccr/conf
/opt$ mkdir /opt/iccr/data
/opt$ mkdir /opt/iccr/download
/opt$ mkdir /opt/iccr/lib
/opt$ mkdir /opt/iccr/logs
/opt$ mkdir /opt/iccr/tmp
run deploy script
~/projects/iccr/iccr$ ./deploy-iccr.bash
tar gz at at the /opt level:
/opt$ tar -czf ~/projects/dist/iccr-1.0.1.tgz iccr
test:
/opt$ sudo mv iccr iccr-1.0.1-dist
/opt$ sudo tar -xzf ~/projects/dist/iccr-1.0.1.tgz
/opt$ sudo chown -R dana:dana iccr
upload tgz archive:
upload change log:
~/projects/iccj$ cp changelog.txt ~/projects/dist/iccr-1.0.1-changelog.txt
----------
Sat: 12/10/2016
Bump artifact version to 1.0.2-SNAPSHOT
-------------
Sun: 12/11/2016
Automatic refresh of IPs to IRI:
- after startIota: stops, starts nbr refresh
- after nbrs set, stops, starts nbr refresh
- on change parameter, stops, starts timer
- if parameter is <= 0, doesn't run refresh
checkin
------------
Thu: 12/15/2016
Bumped version to 1.0.3-SNAPSHOT: ~/bin/changeMavenVersion.bash
Merge iota dld link and filename to just dld link
iccr.properties:
Dropped iotaDownloadkFilename
Changed iotaDownloadLink=http://188.138.57.93/IRI-1.1.1.1.jar
checked in
Fix IRI log loading:
- what is user's intent
1) page through log lines from top
- ui dialog opens, does GET /iota/log?numLines=500
- svr returns 500 lines from top, lastLine# as header
- ui does GET /iota/log?numLines=500&lineNum=<lastLineNum>
2) tail log lines as operation, always getting most recent
- ui dialog opens, does POST /iota/log {numLines=500}
- svr returns {tailId=X, lines=[], fileLen=Y}
- ui does get /iota/log/{X}
3) tail log lines as GET with query parameters, always getting most recent
- ui dialog opens, does GET /iota/log?tail=true&numLines=500
- svr returns lines[], lastPosition as header
- ui repeats GET /iota/log?tail=true&numLines=500&lastPosition=Y
go with #3:
qp:
nl=numLines
lfp=lastFilePosition
fd=fileDirection=tail or head, default is tail
svr returns object:
{
lines=[],
lfp=X,
}
UI: SVR:
GET?nl&lfp=null on dialog open fileSeeek to len-500 or top of file: => {lines=<numLines>, lfp=X}
if lastFilePos < fileLen, immediate GET fileSeek to lastFilePosition and return next 500: => {lines=<numLines>, lfp=X}
else does wait and then GET?nl&lfp=X => {lines=<numLines>, lfp=X}
-------
Sun: 12/18/2016
Fixed removal of deleted neighbors.
Add tailing of iccr event log and more from head operations
Released version 1.0.3
mvn clean install
edit ./release-iccr.bash
sudo ./release-iccr.bash
./deploy-iccr.bash
checked in
uploaded
bumped to 1.0.4-SNAPSHOT
---------------
Wed: 12/21/2016
4) B2: When changing the IOTA Port to a custom port number, ICCJ will not be able to get the Neighbors and node info any more. This means that the localhost port number the ICCR uses to make the API calls to the IRI needs to be a variable equal to the user defined port number.
In my last email, regarding version 1.0.2 I sad it would be best if we removed the "IOTA Port" Input field, so that the port number would just be included in the "IOTA Start Command" Input field. But as this issue shows, we probably need the "IOTA Port" Input field to stay, to set the port variable for the API calls...
What are your thoughts on this?
5) B3 When changing the ICCR port number, it requires the ICCR to restart for changes to take affect. Can the ICCR restart command be invoked on change of the ICCR port number?
Else, a message notifying the user that a restart of ICCR is required for ICCR port changes to take affect would be good.
-----------
Thu: 12/22/2016
done:
B3 changing iccr port number, requires an iccr restart:
New REST api: POST /iccr/rs/iccr/cmd/{action} optional payload: IccrPropertyListDto
New REST impl: doIccrAction
New IccrAgent
New IccrAction interface
New IccrActionFactory
New AbstractIccrAction
New RestartIccrAction, add action log lines
New IccrRestartProcess
New restarticcr.bash script, calls iccr-ctl restart in bkground
New Message localize strings:
restartIccr=restart ICCR
restartIccrFail=ICCR restart failed
Test iccr/lib/icc as place to import icc war contents without a web.xml: yes works, web.xml not needed
checked in
-----------
Fri: 12/23/2016
Fixed iota log file reader
Fixed log file reader head, keeps returning same block on each add
Fixed log file reader tail on first query, it will seek to and try to get right number of lines
checked in
Bumped version to 1.0.4
checked in
Fixed issue where the iota neighbors were sometimes not being added to IRI when iccr was told to start IOTA. The workaround would be to do a save of neighbors from the ICC UI to add neighbors. The problem was that sometimes the IRI would take a longer time than expected to spin up.
------------
Sun: 12/25/2016
Added ReST resource and properties source support for icc languages
Bumped to 1.0.5-SNAPSHOT
checked in
-------------
Tue: 12/27/2016
Adjusted deploy and install scripts for sudo and user and group
Fix the iccr-ctl script to run on mac (ps fails)
Fix the iota start/stop script to run on mac (ps fails)
----------------------
Tue: 1/3/2017
Changed version to 1.0.5
checked in
----------------------
Wed: 1/4/2017
Changed version to 1.0.6-SNAPSHOT
d 1.) In the ICCR config, changing the default IOTA Start Command from "java -jar IRI.jar" to "java -jar IRI.jar -p"
d 2.) In the ICCJ config, changing the default IOTA Client Download Link to "http://85.93.93.110/iri-1.1.2.3.jar"
d 3.) In the ICCJ config, changing the default Neighbor Status refresh time to "10" and the NodeInfo refresh time to "60" (I personally found that its more practicable with this settings, then the initial values I had put in the PoC)
d 4) check for java being installed: good idea, I'll add that;
d 5) prompt for and attempt to install java: I'll investigate that and let you know;
d 6) check for and create /opt/iota if needed: I'll add that;
d 7) prompt for and set ICCR password: great idea, I'll add that;
checked in
Finish java version check
--------------------
Thu: 1/5/2017
Finished updates to install script
test install java on ubuntu and rhel...
8) Updated patch-iccr script to insert new default values
checked in
------------------
Tue: 1/10/2017
d Fix ps call in checkiotastatus script to run on mac
released 1.0.7
------------------------
Sun: 1/29/2017
d checkin pki keys, scripts:
d ~/projects/pki/icc$ cp icc-pki-1.0.1-zip ~/projects/iccr/iccr/
d no delete if from git
add to gdrive:
d cp ~/projects/pki/icc/icc-pki-1.0.1-zip ~/projects/dist/
upload
d delete unused props from iccr.properties
d delete iccr installiri.bash
d set versions to 0.9.0-SNAPSHOT
d add api key complexity to install-iccr.bash
add swagger dep
add swagger annotations
checkin iccr artifacts to allow standalone iccj build
manage log file size
add curl examples:
mkdir /tmp/curl-examples
todo:
Add stop iccr action and worker
Add entry to iccr event log when a nbr is added or changed or removed
Setup logging fraction in main with periodic rotating:
https://wildfly-swarm.gitbooks.io/wildfly-swarm-users-guide/content/common/logging.html
https://wildfly-swarm.github.io/wildfly-swarm-javadocs/2017.1.0-SNAPSHOT/apidocs/org/wildfly/swarm/config/logging/package-summary.html
http://stackoverflow.com/questions/40657889/log-levels-configuration-with-wildfly-swarm
Setup swagger fraction:
https://github.com/wildfly-swarm/wildfly-swarm-examples/tree/master/jaxrs/swagger
Misc:
https://github.com/myfear/WildFlySwarmDockerSample/blob/master/pom.xml
CORS example under here:
https://github.com/wildfly-swarm/wildfly-swarm-examples/tree/master/jaxrs/swagger/src/main/java/org/wildfly/swarm/examples/jaxrs/swagger
In future iri start should be "java -jar IRI.jar -p <port>", for now keep default "java -jar IRI.jar -p <port>"
Create a install-icc script:
cd /opt
sudo unzip
ask for user
ask for group
chown -R
Discovery of existing IOTA nodes:
if not in config: add?
ProcessBuilder for iccr ctl
Action for restart iccr action
Process for restart iccr
Shutdown hook
Finish changelog
us 6 iccr iota get install info
rest api: get rs/iota/installinfo
agent
us 6 rest api for get iota isntall info
iccr-cli using http client to talk to iccr over iccr rest api
UI note: content from iota is in "content" prop, it may contain exception property
see question: should install also start, it does now
see question: add nbrs should always be done in start?
capture output of os process to debug failure
purge iccr.properties that aren't configurable from api
is processfactory needed?
update dld us with note: dld file will be stored, but copied to iri.jar in start cmd
Server emit localized text for status in UI
new us: event csv
new us: restart
new us: localized text
iccrCountryLocale=US
iccrLanguageLocale=en
#iccrCountryLocale=DE
#iccrLanguageLocale=de
How best to do neighbors in java prop file: each nbr needs a key?
Do specific app/config/neighbors get/set rest api?
update us 4 additional prop validations
Manage logs: silence swarm, store changes to single file for audit purposes
x Will update of neighbor config prop need a specific dto for incoming handling?
test resources:
iccr.properties
installer:
iccr.properties
add logging
windows cmd script to control iccr
autodetect if iota is already installed and/or running at install
change us drop bulk set
change us add direct set of nbrs in separate endpoint
new us iotaDownloadFilename=IRI.jar
new us export iota event info csv
*****
questions:
Are neighbors required before starting iota, should starting iota first check for neighbors being configured?
Is IRI being started with sudo?
Starting iota has a single command: java -jar IRI.jar
Additional arguments can be passed to the java VM: java -DpropName=propValue -jar IRI.jar
Arguments can be passed as command line input to the IRI.jar: java -jar IRI.jar <arg1> <arg2>
Actual filename of IRI.jar can be changed: java -jar IRI-1.1.0.jar
Needs sudo and run in background with output redirected to a file: sudo nohup java -jar IRI.jar > /opt/iota/iri.console 2>&1 &
All together: sudo nohup java -DpropName=propVal -jar IRI-1.1.0.jar <port> <nbr1> <nbr2> > /opt/iota/iri.console 2>&1 &
Info needed to run IRI:
1) List of key value pairs of properties to pass java VM
2) Path to which IOTA or IRI jar file to run
3) Command line arguments to pass to IOTA
Or just 4 props with OS specific details
iotaDir=/opt/iota
iotaStartCmd=java -jar IRI.jar
iotaPortNumber=14265
and maybe jvm args:
iotaJvmArgKeys=a,b,c
iotaJvmArg.a=a-val
iotaJvmArg.b=b-val
iotaJvmArg.c=c-val
Could result in a script: startIota.bash <jarname> <portNumber> <jvmargs>
jvmargs="-Dprop=value"
cd $iotaDir
sudo nohup java ${jvmargs} -jar IRI.jar $iotaPortNumber > iota.console 2>&1 &
capture pid
*****