legionio 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +27 -10
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +7 -2
  5. data/CHANGELOG.md +21 -0
  6. data/Dockerfile +9 -0
  7. data/Gemfile +0 -11
  8. data/README.md +158 -42
  9. data/Rakefile +0 -6
  10. data/bitbucket-pipelines.yml +17 -52
  11. data/docker_deploy.rb +8 -0
  12. data/exe/legion +3 -49
  13. data/{bin/legion → exe/legionio} +5 -42
  14. data/exe/lex_gen +5 -0
  15. data/{legion.gemspec → legionio.gemspec} +25 -20
  16. data/lib/legion.rb +4 -0
  17. data/lib/legion/cli.rb +56 -0
  18. data/lib/legion/cli/chain.rb +35 -0
  19. data/lib/legion/cli/cohort.rb +10 -0
  20. data/lib/legion/cli/function.rb +41 -0
  21. data/lib/legion/cli/lex/actor.rb +31 -0
  22. data/lib/legion/cli/lex/exchange.rb +32 -0
  23. data/lib/legion/cli/lex/message.rb +32 -0
  24. data/lib/legion/cli/lex/queue.rb +45 -0
  25. data/lib/legion/cli/lex/runner.rb +70 -0
  26. data/lib/legion/cli/lex/templates/actor.erb +6 -0
  27. data/lib/legion/cli/lex/templates/actor_spec.erb +0 -0
  28. data/lib/legion/cli/lex/templates/base/bitbucket.yml.erb +69 -0
  29. data/lib/legion/cli/lex/templates/base/gemfile.erb +3 -0
  30. data/lib/legion/cli/lex/templates/base/gemspec.erb +26 -0
  31. data/lib/legion/cli/lex/templates/base/gitignore.erb +11 -0
  32. data/lib/legion/cli/lex/templates/base/lex.erb +9 -0
  33. data/lib/legion/cli/lex/templates/base/lex_spec.erb +5 -0
  34. data/lib/legion/cli/lex/templates/base/lic.erb +21 -0
  35. data/lib/legion/cli/lex/templates/base/rakefile.erb +6 -0
  36. data/lib/legion/cli/lex/templates/base/readme.md.erb +2 -0
  37. data/lib/legion/cli/lex/templates/base/rubocop.yml.erb +15 -0
  38. data/lib/legion/cli/lex/templates/base/spec_helper.rb.erb +11 -0
  39. data/lib/legion/cli/lex/templates/base/version.erb +7 -0
  40. data/lib/legion/cli/lex/templates/exchange.erb +11 -0
  41. data/lib/legion/cli/lex/templates/exchange_spec.erb +0 -0
  42. data/lib/legion/cli/lex/templates/message.erb +23 -0
  43. data/lib/legion/cli/lex/templates/message_spec.erb +0 -0
  44. data/lib/legion/cli/lex/templates/queue.erb +12 -0
  45. data/lib/legion/cli/lex/templates/queue_helper.erb +24 -0
  46. data/lib/legion/cli/lex/templates/queue_spec.erb +11 -0
  47. data/lib/legion/cli/lex/templates/runner.erb +11 -0
  48. data/lib/legion/cli/lex/templates/runner_spec.erb +11 -0
  49. data/lib/legion/cli/relationship.rb +22 -0
  50. data/lib/legion/cli/task.rb +49 -0
  51. data/lib/legion/cli/trigger.rb +88 -0
  52. data/lib/legion/cli/version.rb +5 -0
  53. data/lib/legion/extensions.rb +57 -62
  54. data/lib/legion/extensions/actors/base.rb +0 -2
  55. data/lib/legion/extensions/actors/poll.rb +0 -1
  56. data/lib/legion/extensions/actors/subscription.rb +1 -0
  57. data/lib/legion/extensions/builders/runners.rb +5 -0
  58. data/lib/legion/extensions/core.rb +9 -4
  59. data/lib/legion/extensions/helpers/base.rb +3 -3
  60. data/lib/legion/extensions/helpers/lex.rb +29 -1
  61. data/lib/legion/extensions/helpers/logger.rb +3 -6
  62. data/lib/legion/extensions/helpers/task.rb +1 -1
  63. data/lib/legion/extensions/transport.rb +9 -7
  64. data/lib/legion/lex.rb +89 -0
  65. data/lib/legion/service.rb +55 -4
  66. data/lib/legion/version.rb +1 -1
  67. metadata +196 -51
  68. data/bin/console +0 -16
  69. data/bin/setup +0 -8
  70. data/bin/test +0 -32
  71. data/lib/legion/exceptions/handled_task.rb +0 -6
  72. data/lib/legion/exceptions/invalidjson.rb +0 -5
  73. data/lib/legion/exceptions/missingargument.rb +0 -6
  74. data/lib/legion/exceptions/wrongtype.rb +0 -10
  75. data/lib/legion/exceptions/wrongtypes/array.rb +0 -8
  76. data/lib/legion/exceptions/wrongtypes/hash.rb +0 -8
  77. data/lib/legion/exceptions/wrongtypes/integer.rb +0 -8
  78. data/lib/legion/exceptions/wrongtypes/string.rb +0 -8
  79. data/settings/client.json +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 054fe7a9c7707f232d0e93719567254ff8b1ca190f0248abc3b8ba1bcba45a84
4
- data.tar.gz: 658bd9bb7e565268e15fc768f7b7691eef6c77738ccd4fba1d87b6bf44e9fbb6
3
+ metadata.gz: 7990b0c192a08c1fd8569cc2a08718c695814136f39c8df08e2b7b4753bfd216
4
+ data.tar.gz: 3f2bd0e6d8b7108d5ad17a069927bd7d6e5b4e1ba2dc6746ffac3582f11b9cdc
5
5
  SHA512:
6
- metadata.gz: 98a94510b0408b5f857adaaaa41efe74de4dcc0c509c21d5630001d9aa4a5af16cb2d7ecf5ff0174d310e6f9e159c81948c2e87c44067100d95e106db8b7e390
7
- data.tar.gz: 1c21c38abdbfc70e384a09604f88a712e5a1d240409443f7f50a8df75ed4f528f856c1a23b038d89d0f7e7c167d3b645df0ef07378d77ce6b311bbb34d27bd9c
6
+ metadata.gz: '05488db705432fec76ee9c07cc5655871e37abfbe02db5319fd2fb9ca60ad637c4d16eb44572f4f8cbac38b54ffbee75c49d3ccfadd7b4c9357996779a21f4fa'
7
+ data.tar.gz: 80fc575ff7e64dc60c60510aebb158c0e0cae2608158f1722e15e64718da43111efc760e4dc8891fc014c42dede039b66bcb99e3ef8ff0b0a80c735d79172f5c
@@ -5,16 +5,15 @@ jobs:
5
5
  - image: circleci/ruby:2.5-node
6
6
  steps:
7
7
  - checkout
8
- - run: gem install rubocop
8
+ - run: gem install rubocop rubocop-rspec rubocop-rake
9
9
  - run:
10
10
  name: Run Rubocop
11
11
  command: rubocop
12
12
  - store_test_results:
13
13
  path: test_results
14
-
15
- "ruby-two-seven":
14
+ "ruby-three":
16
15
  docker:
17
- - image: circleci/ruby:2.7-node
16
+ - image: circleci/ruby:3-node
18
17
  - image: mysql:5.7
19
18
  environment:
20
19
  MYSQL_DATABASE: 'legion'
@@ -24,6 +23,9 @@ jobs:
24
23
  - image: rabbitmq:3.7
25
24
  steps:
26
25
  - checkout
26
+ - run:
27
+ name: bundle update
28
+ command: gem update bundler
27
29
  - run:
28
30
  name: Bundle Install
29
31
  command: bundle install
@@ -33,9 +35,9 @@ jobs:
33
35
  when: always
34
36
  - store_test_results:
35
37
  path: test-results
36
- "ruby-two-five":
38
+ "ruby-two-seven":
37
39
  docker:
38
- - image: circleci/ruby:2.5-node
40
+ - image: circleci/ruby:2.7-node
39
41
  - image: mysql:5.7
40
42
  environment:
41
43
  MYSQL_DATABASE: 'legion'
@@ -45,6 +47,9 @@ jobs:
45
47
  - image: rabbitmq:3.7
46
48
  steps:
47
49
  - checkout
50
+ - run:
51
+ name: bundle update
52
+ command: gem update bundler
48
53
  - run:
49
54
  name: Bundle Install
50
55
  command: bundle install
@@ -54,9 +59,9 @@ jobs:
54
59
  when: always
55
60
  - store_test_results:
56
61
  path: test-results
57
- "ruby-two-six":
62
+ "ruby-two-five":
58
63
  docker:
59
- - image: circleci/ruby:2.6-node
64
+ - image: circleci/ruby:2.5-node
60
65
  - image: mysql:5.7
61
66
  environment:
62
67
  MYSQL_DATABASE: 'legion'
@@ -66,6 +71,9 @@ jobs:
66
71
  - image: rabbitmq:3.7
67
72
  steps:
68
73
  - checkout
74
+ - run:
75
+ name: bundle update
76
+ command: gem update bundler
69
77
  - run:
70
78
  name: Bundle Install
71
79
  command: bundle install
@@ -75,9 +83,9 @@ jobs:
75
83
  when: always
76
84
  - store_test_results:
77
85
  path: test-results
78
- "jruby-nine-two":
86
+ "ruby-two-six":
79
87
  docker:
80
- - image: circleci/jruby:9.2-jra
88
+ - image: circleci/ruby:2.6-node
81
89
  - image: mysql:5.7
82
90
  environment:
83
91
  MYSQL_DATABASE: 'legion'
@@ -87,6 +95,9 @@ jobs:
87
95
  - image: rabbitmq:3.7
88
96
  steps:
89
97
  - checkout
98
+ - run:
99
+ name: bundle update
100
+ command: gem update bundler
90
101
  - run:
91
102
  name: Bundle Install
92
103
  command: bundle install
@@ -117,3 +128,9 @@ workflows:
117
128
  filters:
118
129
  branches:
119
130
  only: /\bdevelop\b|\bmaster\b/
131
+ - ruby-three:
132
+ requires:
133
+ - ruby-two-five
134
+ filters:
135
+ branches:
136
+ only: /\bdevelop\b|\bmaster\b/
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.key
13
13
  # rspec failure tracking
14
14
  .rspec_status
15
+ legionio.key
@@ -1,3 +1,8 @@
1
+ require:
2
+ - rubocop-rspec
3
+
4
+ RSpec/FilePath:
5
+ Enabled: false
1
6
  Layout/LineLength:
2
7
  Max: 160
3
8
  IgnoredPatterns:
@@ -19,7 +24,7 @@ Metrics:
19
24
  - .trace
20
25
  Metrics/MethodLength:
21
26
  Max: 50
22
- ExcludedMethods:
27
+ IgnoredMethods:
23
28
  - .unknown
24
29
  - .fatal
25
30
  - .error
@@ -33,7 +38,7 @@ Metrics/ModuleLength:
33
38
  Max: 1500
34
39
  Metrics/BlockLength:
35
40
  Max: 40
36
- ExcludedMethods:
41
+ IgnoredMethods:
37
42
  - .unknown
38
43
  - .fatal
39
44
  - .error
@@ -1,5 +1,26 @@
1
1
  # Legion Changelog
2
2
 
3
+ ## v0.4.0
4
+ * Moving all legion-cli code to inside the legion gem instead of a seperate gem
5
+ * Removing bundled Legion::Data gem from LegionIO(must be installed with gem install legion-data)
6
+ * Removing JRuby support
7
+ * Removing the following gems from gemspec, hashdiff, legion-data, mysql2, sequel, bunny, bundler, codecov
8
+ * Skipping auto install if using bundler. It only works with the binary
9
+ * Adding new docker_deploy.rb script to automatically push a new docker tag with a deployment
10
+ * Adding multiple version dependencies to previously open ended gems
11
+ * Updating Dockerfile to have `--no-document --no-prerelease` flags
12
+ * Updating README
13
+ * Enabling rubocop-rspec
14
+ * Adding support to specify a LEX version to automatically install
15
+ * Updating `legion-transport` gem min version to 1.1.8
16
+
17
+ ## v0.3.6
18
+ * Updating executables to use Legion::CLI
19
+ * Updating bitbucket-pipelines
20
+ * Changing base legion command to legionio and updating Dockerfile
21
+ * Blocking truffleruby from using Legion:Data as it's slow for unknown reasons
22
+ * Changing task update reverting to RMQ message to level debug
23
+
3
24
  ## v0.3.0
4
25
  * Updating dependencies based on if we are using `JRUBY` or not
5
26
  * Cleaning up some files and rubocop errors
@@ -0,0 +1,9 @@
1
+ FROM ruby:2.7-alpine
2
+ LABEL maintainer="Matthew Iverson <matthewdiverson@gmail.com>"
3
+
4
+ RUN mkdir /etc/legionio
5
+ RUN apk update && apk add build-base postgresql-dev mysql-client mariadb-dev tzdata gcc git
6
+
7
+ COPY . ./
8
+ RUN gem install legionio legion-data tzinfo-data tzinfo --no-document --no-prerelease
9
+ CMD legionio
data/Gemfile CHANGED
@@ -1,14 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
5
- gem 'lex-conditioner'
6
- gem 'lex-esphome'
7
- gem 'lex-health'
8
- gem 'lex-http'
9
- gem 'lex-influxdb'
10
- gem 'lex-lex'
11
- gem 'lex-log'
12
- gem 'lex-scheduler', path: '../../lex/lex-scheduler'
13
- gem 'lex-tasker'
14
- gem 'lex-transformer'
data/README.md CHANGED
@@ -1,46 +1,162 @@
1
- # Legion
1
+ # LegionIO
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library
4
- into a gem. Put your Ruby code in the file `lib/legion`. To experiment with that code, run `bin/console` for
5
- an interactive prompt.
3
+ LegionIO is a framework for automated and connecting things. You can see all the docs inside confluence
4
+ https://legionio.atlassian.net/wiki/spaces/LEGION/overview
5
+ https://legionio.atlassian.net/wiki/spaces/LEX/pages/7864551/Extensions
6
6
 
7
-
8
- ## Installation
9
-
10
- Add this line to your application's Gemfile:
11
-
12
- ```ruby
13
- gem 'legion'
7
+ ### What does it do?
8
+ LegionIO is an async job engine designed for scheduling tasks and creating relationships between things that wouldn't
9
+ otherwise be connected. Relationships do not have to be a single path. Both of these would work
10
+ * `foo bar cat → dog`
14
11
  ```
12
+ a → b → c
13
+ b → e → z
14
+ e → g
15
+ ```
16
+ In the second scenario, when a runs, it causes b to run which then causes both c and e to run in parallel
17
+
18
+ It supports both conditions and transformation. The idea of a transformation is you can't connect two indepedent services
19
+ and expect them to know how to talk to each other.
20
+
21
+ ### Running
22
+ Run `gem install legionio` to install legion. If you want to use database features, you will need to
23
+ run `gem install legion-data` also.
24
+
25
+ After installing gem you can use the commands `legionio` to start legion, `legion` to access things
26
+ and `lex_gen` to generate a new legion extension
27
+
28
+ ### Example Legion Extensions(LEX)
29
+ * [lex-http](https://bitbucket.org/legion-io/lex-http/src/master/) - Gives legion the ability to make http requests, [docs](https://legionio.atlassian.net/wiki/spaces/LEX/pages/12910593/Lex+Http)
30
+ * [lex-influxdb](https://bitbucket.org/legion-io/lex-influxdb/src/master/) - Write, read, and manage influxdb nodes, [docs](https://legionio.atlassian.net/wiki/spaces/LEX/pages/614891774/Lex+Influxdb)
31
+ * [lex-log](https://bitbucket.org/legion-io/lex-log/src/master/) - Send log items to either stdout or a file with lex-log, [docs](https://legionio.atlassian.net/wiki/spaces/LEX/pages/614858995/Lex+Log)
32
+ * [lex-memcache](https://bitbucket.org/legion-io/lex-memcached/src/master/) - run memcached commands like set, add, append, delete, flush, reset_stats against memcached servers, [docs](https://legionio.atlassian.net/wiki/spaces/LEX/pages/614858753/Lex+Memcached)
33
+ * [lex-pihole](https://bitbucket.org/legion-io/lex-pihole/src/master/) - Allows Legion to interact with [Pi-Hole](https://pi-hole.net/). Can do things like get status, add/remove domains from the list, etc
34
+ * [lex-ping](https://bitbucket.org/legion-io/lex-ping/src/master/) - You can ping things?, [docs](https://legionio.atlassian.net/wiki/spaces/LEX/pages/631373895/Lex+Ping)
35
+ * [lex-pushover](https://bitbucket.org/legion-io/lex-pushover/src/master/) - Connects Legion to [Pushover](https://pushover.net/), [docs]()
36
+ * [lex-redis](https://bitbucket.org/legion-io/lex-redis/src/master/) - similiar to lex-memcached but for redis
37
+ * [lex-sleepiq](https://bitbucket.org/legion-io/lex-sleepiq/src/master/) - Control your SleepIQ bed with Legion!
38
+ * [lex-ssh](https://bitbucket.org/legion-io/lex-ssh/src/master/) - Send commands to a server via SSH in an async fashion, [docs](https://legionio.atlassian.net/wiki/spaces/LEX/pages/614891551/Lex+SSH)
39
+
40
+ Bitbucket repos for extensions that are active or being worked on
41
+ [lex list](https://bitbucket.org/legion-io/workspace/projects/LEX)
42
+ A nice list in the wiki to view all the extensions, their docs and status
43
+ [Legion Extensions](https://legionio.atlassian.net/wiki/spaces/LEX/pages/7864551/Extensions)
44
+
45
+ ### Scheduling Tasks
46
+ 1) Ensure you have the Legion::Data gem installed and configured
47
+ 2) Make sure to have `lex-scheduler` extension installed so that it generates the schedules table in the database
48
+ 3) From there you can add a function to be run at a given cron syntax or interval
49
+ 4) Setting the interval column will make the job run X seconds after the last time it is completed and will ignore the cron colum
50
+ 5) Setting the cron column will ensure the job runs at the given times regardless of when it was run last, only works if interval is null
51
+ 6) Cron supports both `*/5 * * * *` style and verbose like `every minute` and `every day at noon`
52
+
53
+
54
+ ### Creating Relationships
55
+ To be populated
56
+
57
+ ### Conditions
58
+ You can create complex conditional statements to ensure that when a triggers b, b only runs if certain conditions
59
+ are met. Example conditional statement
60
+ ```json
61
+ {
62
+ "all": [{
63
+ "fact": "pet.type",
64
+ "value": "dog",
65
+ "operator": "equal"
66
+ },{
67
+ "fact":"pet.hungry",
68
+ "operator":"is_true"
69
+ }]
70
+ }
15
71
 
16
- And then execute:
17
-
18
- $ bundle
19
-
20
- Or install it yourself as:
21
-
22
- $ gem install legion
23
-
24
- ## Usage
25
-
26
- TODO: Write usage instructions here
27
-
28
- ## Development
29
-
30
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
31
- You can also run `bin/console` for an interactive prompt that will allow you to experiment.
32
-
33
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version,
34
- update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git
35
- tag for the version, push git commits and tags, and push the `.gem` file
36
- to [rubygems.org](https://rubygems.org).
37
-
38
- ## Contributing
39
-
40
- Bug reports and pull requests are welcome on GitHub at https://bitbucket.org/whonodes/legion/issues.
41
- This project is intended to be a safe, welcoming space for collaboration, and contributors are
42
- expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
43
-
44
- ## License
45
-
46
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
72
+ ```
73
+ You can nest conditions in an unlimited fashion to create and/or scenarios to meet your needs
74
+ ```json
75
+ {
76
+ "all": [
77
+ "any":[
78
+ {"fact":"pet.type", "value":"dog","operator":"equal"},
79
+ {"fact":"pet.type", "value":"cat","operator":"equal"}
80
+ ],
81
+ {
82
+ "fact": "pet.hungry",
83
+ "operator": "is_true"
84
+ },{
85
+ "fact":"pet.overweight",
86
+ "operator":"is_false"
87
+ }]
88
+ }
89
+ ```
90
+ *Conditions are supported by the `lex-conditioner` extension and are not required to be run inside the legion framework*
91
+ You can read the docs with more examples in the [wiki](https://legionio.atlassian.net/wiki/spaces/LEX/pages/614957181/Lex+Conditioner)
92
+
93
+
94
+ ### Transformations
95
+ Transformations are a critical piece of interconnecting two independent items. Without it, service B doesn't know what
96
+ to do with the result from service A
97
+ `lex-conditioner` uses a combination of the [tilt](https://rubygems.org/gems/tilt) gem and erb style syntax.
98
+ ##### Examples
99
+ Creating a new pagerduty incident
100
+ ```json
101
+ {"message":"New PagerDuty incident assigned to <%= assignee %> with a priority of <%= severity %>","from":"PagerDuty"}
102
+ ```
103
+ Example transformation to make the `lex-log` extension output a message
104
+ ```json
105
+ {"message":"transform2","level":"fatal"}
106
+ ```
107
+ You can also call Legion services to get the data you need, example sending a pushover message
108
+ ```json
109
+ {"message":"This is my pushover body", "title": "this is my title", "token":"<%= Legion::Settings['lex']['pushover']['token'] %>" }
110
+ ```
111
+ Or if you wanted to make a real time call via `Legion::Crypt` to get a [Hashicorp Vault](https://www.vaultproject.io/) value
112
+ ```json
113
+ {"message":"this is another body", "title":"vault token example", "token":"<%= Legion::Crypt.read('pushover/token') %> "}
114
+ ```
115
+ *Transformations are supported by the `lex-transformation` extension and are not "technically" required to be run inside the legion framework*
116
+ You can read the docs with more examples in the [wiki](https://legionio.atlassian.net/wiki/spaces/LEX/pages/612270222/Lex+Transformer)
117
+
118
+ ## FAQ
119
+ ### Does it scale?
120
+ Yes. Actually quite well. The framework uses RabbitMQ to ensure jobs are scheduled and run in a FIFO order. As you add
121
+ more works, it just subscribes to the queues the workers can support and does more work. It is really geared towards a
122
+ docker/K8 type of environment however it can be run locally, on a VM, etc.
123
+
124
+ As of right now, it has been tested to around 100 workers running in docker without any performance issues. You will
125
+ likely see performance issues on the DB or RabbitMQ side before Legion has issues.
126
+
127
+ Another benefit is that you can run multiple LEXs in one worker or you could have dedicated workers that only run a single LEX.
128
+ In example if you have to make a ton of ssh connections via `lex-ssh`, maybe you want to run 10 pods with no other extensions in them
129
+ but then run a pod with `lex-pagerduty`, `lex-log` and `lex-http` to send out notifications after each ssh task is completed
130
+
131
+ ### High Availability
132
+ Because you can run this thing with multiple processes and it will distribute the work, it is naturally HA oriented.
133
+ if a worker goes down for some reason, another one should pick it up(assuming another work has that LEX enabled). There
134
+ are no hidden features, pay walls, etc to get HA. Just run more instances of LegionIO
135
+
136
+ ### Price and License
137
+ LegionIO is completely free. It was build using free time. There are no features held back, no private repos.
138
+ Everything is under an MIT license to keep it as open as possible. With that, the devs can't always help with support,
139
+ well because it's free.
140
+
141
+ ### Who is it geared for?
142
+ Anyone? Everyone? It could be used in a homelab to automate updating VMs. It could be used by someone to take ESPHome
143
+ sensor data and pipe it to influxdb. At least that is what @Esity does. It could also be used by a company or enterprise looking
144
+ to replace other tools.
145
+
146
+ ### But it is written in ruby
147
+ Yep.
148
+
149
+ ### Similiar projects
150
+ There are multiple projects that are similiar. Some things like IFTTT are great(but is it?) but then again, cost money.
151
+ * [Node-Red](https://nodered.org/) - No HA but has some good features and a great drag and drop interface
152
+ * [n8n.io](https://n8n.io/) - Working on HA but [not there yet](https://github.com/n8n-io/n8n/pull/1294)
153
+ * [StackStorm](https://stackstorm.com/) - Written in Python, has potential but I feel they are removing features to convince you to pay for it
154
+ * [Jenkins](https://www.jenkins.io/) - It's jenkins. I don't need to say anything else
155
+ * [Huginn]() - Another IFTTT style app written in ruby. Not sure on this one but it doesn't have HA from what I can tell [github issue](https://github.com/huginn/huginn/issues/2198)
156
+
157
+ ### Other fun facts
158
+ * Supports Hashicorp vault for storing secrets/settings/etc
159
+ * Can enable global message encryption so that all messages going through RMQ are encrypted with aes-256-cbc
160
+ * Each worker generates a private/public key that can be used for internode communication, it also will generate a cluster secret
161
+ for all nodes to have so they can share data accross the entire cluster. The cluster secret by default is stored only in memory and
162
+ and is generated when the first worker starts
data/Rakefile CHANGED
@@ -29,10 +29,4 @@ namespace :deploy do
29
29
  puts Gem.methods(false)
30
30
  puts Legion::VERSION
31
31
  end
32
-
33
- task :staging do
34
- end
35
-
36
- task :production do
37
- end
38
32
  end
@@ -1,55 +1,20 @@
1
- image: ruby:2.5.0
1
+ image: ruby:2.7
2
2
 
3
3
  pipelines:
4
4
  tags:
5
- '0.1.0':
6
- - step:
7
- caches:
8
- - bundler
9
- deployment: rubygems
10
- script:
11
- - mkdir -p ~/.gem/credentials
12
- - (umask 077 ; echo $gem_creds | base64 --decode > ~/.gem/credentials)
13
- - gem build legion.gemspec
14
- - gem push legionio-*.gem
15
- branches:
16
- master:
17
- - step:
18
- caches:
19
- - bundler
20
- script:
21
- - gem install bundle rubocop
22
- - bundle install
23
- - rubocop
24
- - rake
25
- services:
26
- - mysql
27
- - broker
28
- default:
29
- - step:
30
- caches:
31
- - bundler
32
- script:
33
- - gem install bundle rubocop
34
- - bundle install
35
- - rubocop
36
- - rake
37
- services:
38
- - mysql
39
- - broker
40
- definitions:
41
- caches:
42
- bundler: vendor/bundle
43
- services:
44
- mysql:
45
- image: mysql:5.7
46
- environment:
47
- MYSQL_DATABASE: 'legion'
48
- MYSQL_ROOT_PASSWORD: 'legion'
49
- MYSQL_USER: 'legion'
50
- MYSQL_PASSWORD: 'legion'
51
- broker:
52
- image: rabbitmq:3
53
- environment:
54
- RABBITMQ_DEFAULT_USER: guest
55
- RABBITMQ_DEFAULT_PASS: guest
5
+ "v*":
6
+ - step:
7
+ name: Push to RubyGems
8
+ deployment: RubyGems
9
+ script:
10
+ - gem install gem-release
11
+ - (umask 077 ; echo $gem_creds | base64 --decode > ~/.gem/credentials)
12
+ - gem release
13
+ - sleep(2)
14
+ artifacts:
15
+ - pkg/**
16
+ - step:
17
+ name: Push to Docker
18
+ deployment: Docker
19
+ script:
20
+ - './docker_deploy.rb'