smartcloud 0.5.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cd9c5057e257cd856bdbd7f0d5b49323e243bf2fcb56d6de8e912183770fe28
4
- data.tar.gz: fb1c258e4669f99490ae607b26f16a997077a4b3a05704764687d6b2a11f500d
3
+ metadata.gz: 0f8b33a78533be526973b7a6cd9b0908065ff243bd81f9f187e7b47ef3206b3f
4
+ data.tar.gz: b0c32955987e7dd6871b4d3ba19079ba89b900b69f6cb267554737447e4e32f0
5
5
  SHA512:
6
- metadata.gz: c0974f0a92acdb173d7faadf91d9fac80978cf4f3b3317eaad31032d948cb45e19247f54971e417dc13b700e4dd4677445473b2c04f26d6c2b51878fbf882770
7
- data.tar.gz: e4d61d9fe4735bc87d4e6fbb15132788206c63900764f623cbbcbdcdeeb4af51178ca96b02d1e8f4ce0808815f9f9e65aaa6645ee54097cb3c86e681ed4fab82
6
+ metadata.gz: 194c49f31b2732a5f80d29965608346b30411abfeceb51ae1a35c2cc732c81f49d8efbfc13182456af2f197246b856216c19a9d321a26d3074efbd4d615c9e26
7
+ data.tar.gz: c351811641f14509b224801c4b9d1f38eb62c4772bce7c386f662925494d2822d644dae5ece3efbfc38ce7139decf1c01cb00b80e0bd664ba6f1d052985a17ee
File without changes
@@ -0,0 +1,58 @@
1
+ # The main Smartcloud Grids Redis driver
2
+ module Smartcloud
3
+ module Grids
4
+ class Redis < Smartcloud::Base
5
+ def initialize
6
+ end
7
+
8
+ def self.up
9
+ if Smartcloud::Docker.running?
10
+ # Creating networks
11
+ unless system("docker network inspect redis-network", [:out, :err] => File::NULL)
12
+ print "-----> Creating network redis-network ... "
13
+ if system("docker network create redis-network", out: File::NULL)
14
+ puts "done"
15
+ end
16
+ end
17
+
18
+ # Creating & Starting containers
19
+ print "-----> Creating container redis ... "
20
+ if system("docker create \
21
+ --name='redis' \
22
+ --user `id -u`:`id -g` \
23
+ --volume='#{Smartcloud.config.user_home_path}/.smartcloud/grids/grid-redis/data:/data' \
24
+ --restart='always' \
25
+ --network='redis-network' \
26
+ redis:6.0-rc3-alpine3.11 redis-server --appendonly yes", out: File::NULL)
27
+
28
+ puts "done"
29
+ print "-----> Starting container redis ... "
30
+ if system("docker start redis", out: File::NULL)
31
+ puts "done"
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ def self.down
38
+ if Smartcloud::Docker.running?
39
+ # Stopping & Removing containers - in reverse order
40
+ print "-----> Stopping container redis ... "
41
+ if system("docker stop 'redis'", out: File::NULL)
42
+ puts "done"
43
+ print "-----> Removing container redis ... "
44
+ if system("docker rm 'redis'", out: File::NULL)
45
+ puts "done"
46
+ end
47
+ end
48
+
49
+ # Removing networks
50
+ print "-----> Removing network redis-network ... "
51
+ if system("docker network rm redis-network", out: File::NULL)
52
+ puts "done"
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -254,6 +254,10 @@ module Smartcloud
254
254
  'grids/grid-prereceiver',
255
255
  'grids/grid-prereceiver/pre-receive',
256
256
 
257
+ 'grids/grid-redis',
258
+ 'grids/grid-redis/data',
259
+ 'grids/grid-redis/data/.keep',
260
+
257
261
  'grids/grid-redmine',
258
262
  'grids/grid-redmine/files',
259
263
  'grids/grid-redmine/files/.keep',
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ version = File.read(File.expand_path("SMARTBYTES_VERSION", __dir__)).strip
4
+
3
5
  module Smartcloud
4
- VERSION = "0.5.3".freeze
6
+ VERSION = version.freeze
5
7
 
6
8
  def self.version
7
9
  @@version ||= VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timeboard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-23 00:00:00.000000000 Z
11
+ date: 2020-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -100,6 +100,7 @@ files:
100
100
  - lib/smartcloud/grids/grid-prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-1.1.1-r4.apk
101
101
  - lib/smartcloud/grids/grid-prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-doc-1.1.1-r4.apk
102
102
  - lib/smartcloud/grids/grid-prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-openrc-1.1.1-r4.apk
103
+ - lib/smartcloud/grids/grid-redis/.keep
103
104
  - lib/smartcloud/grids/grid-redmine/.keep
104
105
  - lib/smartcloud/grids/grid-solr/config/.keep
105
106
  - lib/smartcloud/grids/grid-solr/config/README.txt
@@ -269,6 +270,7 @@ files:
269
270
  - lib/smartcloud/grids/nextcloud.rb
270
271
  - lib/smartcloud/grids/nginx.rb
271
272
  - lib/smartcloud/grids/prereceiver.rb
273
+ - lib/smartcloud/grids/redis.rb
272
274
  - lib/smartcloud/grids/redmine.rb
273
275
  - lib/smartcloud/grids/solr.rb
274
276
  - lib/smartcloud/logger.rb
@@ -291,6 +293,7 @@ files:
291
293
  - lib/smartcloud/templates/dotsmartcloud/grids/grid-nginx/htpasswd/.keep
292
294
  - lib/smartcloud/templates/dotsmartcloud/grids/grid-nginx/nginx.tmpl
293
295
  - lib/smartcloud/templates/dotsmartcloud/grids/grid-prereceiver/pre-receive
296
+ - lib/smartcloud/templates/dotsmartcloud/grids/grid-redis/data/.keep
294
297
  - lib/smartcloud/templates/dotsmartcloud/grids/grid-redmine/files/.keep
295
298
  - lib/smartcloud/templates/dotsmartcloud/grids/grid-solr/solr/.keep
296
299
  - lib/smartcloud/templates/dotsmartcloud/tmp/.keep