swarm_cluster_cli_ope 0.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/swarm_cluster_cli_ope/cli.rb +27 -19
- data/lib/swarm_cluster_cli_ope/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de6a7a1c00385430cb66e44f3fc8c02bac60bc5c930223c9cf56d592205d4963
|
4
|
+
data.tar.gz: 6e400a291bc159ac2e6149f55fe46cbe7dcdeb84b391ee4d7f93c211d19625d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e680840f5518ac667362afde85caca8f10a86bbb77cc122bd53580284e7ee8c6f365bc0b5b0f158eb494a97431765fd9cf057554c6ed20d3e10ef91779cd1dc3
|
7
|
+
data.tar.gz: 3976388f15a0fe1fd34efe15f2977f3b21d5167c7bbbf3d534c5ab0c10e1b34126110f36e00f186c3cd66b8456929db58585e29a414d6799f1a66b69352e7b31
|
data/Gemfile.lock
CHANGED
@@ -181,7 +181,7 @@ module SwarmClusterCliOpe
|
|
181
181
|
}
|
182
182
|
})
|
183
183
|
|
184
|
-
puts "COMPLETATO" if
|
184
|
+
puts "COMPLETATO" if cmd.send(execute)
|
185
185
|
|
186
186
|
end
|
187
187
|
end
|
@@ -243,28 +243,36 @@ module SwarmClusterCliOpe
|
|
243
243
|
end
|
244
244
|
end
|
245
245
|
|
246
|
-
desc "
|
247
|
-
long_desc <<-LONGDESC
|
248
|
-
le configurazioni sono contenute nell'array: sync_configs.
|
249
|
-
ogni configurazione è composta da:
|
250
|
-
{
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
}
|
255
|
-
- service è il nome del servizio
|
256
|
-
- how è il come sincronizzare, definendo la tipologia
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
- configs: è un hash con le configurazioni per ogni tipo di sincronizzazione
|
246
|
+
desc "stacksync DIRECTION", "Si occupa di scaricare|caricare,utilizzando le configurazioni presenti, i dati dallo stack remoto"
|
247
|
+
long_desc <<-LONGDESC.gsub("\n", "\x5")
|
248
|
+
le configurazioni sono contenute nell'array: sync_configs.
|
249
|
+
ogni configurazione è composta da:
|
250
|
+
{
|
251
|
+
service:""
|
252
|
+
how:""
|
253
|
+
configs:{ }
|
254
|
+
}
|
255
|
+
- service è il nome del servizio
|
256
|
+
- how è il come sincronizzare, definendo la tipologia:
|
257
|
+
---- pg -> DB TODO
|
258
|
+
---- mysql -> DB TODO
|
259
|
+
---- sqlite3 -> DB
|
260
|
+
---- rsync -> RSYNC
|
261
|
+
- configs: è un hash con le configurazioni per ogni tipo di sincronizzazione
|
262
262
|
LONGDESC
|
263
263
|
|
264
|
-
def
|
264
|
+
def stacksync(direction)
|
265
|
+
direction = case direction
|
266
|
+
when 'push'
|
267
|
+
:push
|
268
|
+
when 'pull'
|
269
|
+
:pull
|
270
|
+
else
|
271
|
+
raise "ONLY [push|pull] action accepted"
|
272
|
+
end
|
265
273
|
cfgs.env(options[:environment]) do |cfgs|
|
266
274
|
cfgs.sync_configurations.each do |sync|
|
267
|
-
sync.
|
275
|
+
sync.send(direction)
|
268
276
|
end
|
269
277
|
end
|
270
278
|
end
|