takeltau 0.44.14 → 0.44.18
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/README.md +106 -97
- data/lib/takeltau/default.yml +5 -3
- data/lib/takeltau/docker/check/daemon.rb +0 -2
- data/lib/takeltau/docker/cli.rb +1 -1
- data/lib/takeltau/docker/container/cli.rb +1 -3
- data/lib/takeltau/docker/container/lib.rb +2 -4
- data/lib/takeltau/docker/container/list.rb +0 -4
- data/lib/takeltau/docker/image/cli.rb +1 -1
- data/lib/takeltau/docker/image/tag/check.rb +0 -2
- data/lib/takeltau/docker/image/tag/cli.rb +1 -1
- data/lib/takeltau/git/lib.rb +0 -2
- data/lib/takeltau/info/status/bar.rb +0 -2
- data/lib/takeltau/info/status/cli.rb +2 -2
- data/lib/takeltau/info/status/gopass.rb +0 -2
- data/lib/takeltau/info/status/gpg.rb +0 -2
- data/lib/takeltau/info/status/ssh.rb +1 -3
- data/lib/takeltau/init/packer/cli.rb +1 -1
- data/lib/takeltau/init/takelage/cli.rb +1 -3
- data/lib/takeltau/lib/config.rb +1 -9
- data/lib/takeltau/lib/logging.rb +2 -2
- data/lib/takeltau/lib/project.rb +2 -2
- data/lib/takeltau/lib/subcmd.rb +2 -0
- data/lib/takeltau/lib/system.rb +36 -26
- data/lib/takeltau/mutagen/check/cli.rb +2 -2
- data/lib/takeltau/mutagen/check/daemon.rb +1 -5
- data/lib/takeltau/mutagen/cli.rb +1 -1
- data/lib/takeltau/mutagen/socket/cli.rb +2 -2
- data/lib/takeltau/mutagen/socket/create.rb +1 -5
- data/lib/takeltau/mutagen/socket/docker.rb +1 -3
- data/lib/takeltau/self/commands.rb +3 -3
- data/lib/takeltau/ship/cli.rb +31 -20
- data/lib/takeltau/ship/completion/bash.rb +3 -4
- data/lib/takeltau/ship/container/clean.rb +0 -2
- data/lib/takeltau/ship/container/cli.rb +14 -0
- data/lib/takeltau/ship/container/lib.rb +11 -4
- data/lib/takeltau/ship/container/logs.rb +29 -0
- data/lib/takeltau/ship/ports/lib.rb +0 -6
- data/lib/takeltau/ship/project/cli.rb +37 -8
- data/lib/takeltau/ship/project/create.rb +21 -0
- data/lib/takeltau/ship/project/start.rb +0 -12
- data/lib/takeltau/version +1 -1
- data/lib/takeltau.rb +3 -2
- metadata +4 -2
- data/lib/takeltau/ship/project/logs.rb +0 -27
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# tau ship project create
|
4
|
+
module ShipProjectCreate
|
5
|
+
# Start a takelship
|
6
|
+
def ship_project_create(project, verb = 'Created')
|
7
|
+
takelship = _ship_info_lib_get_takelshipinfo
|
8
|
+
project = _ship_info_lib_get_project project, takelship
|
9
|
+
return false unless _ship_project_start_valid_project? takelship, project
|
10
|
+
|
11
|
+
log.debug "Dumping takelship project \"#{project}\""
|
12
|
+
ports = _ship_ports_lib_get_ports(takelship, project)
|
13
|
+
project_root_dir = config.active['project_root_dir']
|
14
|
+
ship_data_dir = config.active['ship_data_dir']
|
15
|
+
args = []
|
16
|
+
args << "--volume #{project_root_dir}/#{ship_data_dir}:/home/podman/takelship"
|
17
|
+
args << '--env TAKELSHIP_DUMP=true'
|
18
|
+
_ship_container_lib_docker_privileged ports, project, args.join(' ')
|
19
|
+
"#{verb} takelship project \"#{project}\"."
|
20
|
+
end
|
21
|
+
end
|
@@ -3,17 +3,14 @@
|
|
3
3
|
# tau ship project start
|
4
4
|
module ShipProjectStart
|
5
5
|
# Start a takelship
|
6
|
-
# rubocop:disable Metrics/MethodLength
|
7
6
|
def ship_project_start(project)
|
8
7
|
return false unless _ship_project_start_matrjoschka?
|
9
8
|
|
10
9
|
takelship = _ship_info_lib_get_takelshipinfo
|
11
10
|
project = _ship_info_lib_get_project project, takelship
|
12
|
-
|
13
11
|
return false unless _ship_project_start_valid_project? takelship, project
|
14
12
|
|
15
13
|
ports = _ship_ports_lib_get_ports(takelship, project)
|
16
|
-
|
17
14
|
return false unless _ship_project_start_sailing? project, ports
|
18
15
|
|
19
16
|
log.debug 'Writing port configuration to takelage.yml'
|
@@ -24,7 +21,6 @@ module ShipProjectStart
|
|
24
21
|
say "Started project \"#{project}\" on takelship \"#{_ship_container_lib_ship_hostname}\".\n\n"
|
25
22
|
_ship_project_start_print_ports ports
|
26
23
|
end
|
27
|
-
# rubocop:enable Metrics/MethodLength
|
28
24
|
|
29
25
|
private
|
30
26
|
|
@@ -55,8 +51,6 @@ module ShipProjectStart
|
|
55
51
|
end
|
56
52
|
|
57
53
|
# print ports after starting a takelship
|
58
|
-
# rubocop:disable Metrics/MethodLength
|
59
|
-
# rubocop:disable Metrics/AbcSize
|
60
54
|
def _ship_project_start_print_ports(ports)
|
61
55
|
output = []
|
62
56
|
max_length = _ship_project_start_get_maxlength ports
|
@@ -71,12 +65,8 @@ module ShipProjectStart
|
|
71
65
|
end
|
72
66
|
output.join("\n")
|
73
67
|
end
|
74
|
-
# rubocop:enable Metrics/AbcSize
|
75
|
-
# rubocop:enable Metrics/MethodLength
|
76
68
|
|
77
69
|
# get max length of left column
|
78
|
-
# rubocop:disable Metrics/MethodLength
|
79
|
-
# rubocop:disable Metrics/AbcSize
|
80
70
|
def _ship_project_start_get_maxlength(ports)
|
81
71
|
max_length = {}
|
82
72
|
max_length['url'] = 0
|
@@ -93,6 +83,4 @@ module ShipProjectStart
|
|
93
83
|
end
|
94
84
|
max_length
|
95
85
|
end
|
96
|
-
# rubocop:enable Metrics/AbcSize
|
97
|
-
# rubocop:enable Metrics/MethodLength
|
98
86
|
end
|
data/lib/takeltau/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.44.
|
1
|
+
0.44.18
|
data/lib/takeltau.rb
CHANGED
@@ -91,6 +91,7 @@ require_relative 'takeltau/ship/info/lib'
|
|
91
91
|
require_relative 'takeltau/ship/container/list'
|
92
92
|
require_relative 'takeltau/ship/container/clean'
|
93
93
|
require_relative 'takeltau/ship/container/command'
|
94
|
+
require_relative 'takeltau/ship/container/logs'
|
94
95
|
require_relative 'takeltau/ship/container/login'
|
95
96
|
require_relative 'takeltau/ship/container/podman'
|
96
97
|
require_relative 'takeltau/ship/container/sudo'
|
@@ -101,8 +102,8 @@ require_relative 'takeltau/ship/info/cli'
|
|
101
102
|
require_relative 'takeltau/ship/ports/lib'
|
102
103
|
require_relative 'takeltau/ship/ports/list'
|
103
104
|
require_relative 'takeltau/ship/ports/cli'
|
105
|
+
require_relative 'takeltau/ship/project/create'
|
104
106
|
require_relative 'takeltau/ship/project/list'
|
105
|
-
require_relative 'takeltau/ship/project/logs'
|
106
107
|
require_relative 'takeltau/ship/project/start'
|
107
108
|
require_relative 'takeltau/ship/project/cli'
|
108
109
|
require_relative 'takeltau/ship/cli'
|
@@ -137,7 +138,7 @@ module Takeltau
|
|
137
138
|
# Initialize takelage cli.
|
138
139
|
def initialize(args = [], local_options = {}, configuration = {})
|
139
140
|
# Initialize thor parent class
|
140
|
-
super
|
141
|
+
super
|
141
142
|
|
142
143
|
# Initialize global singleton log
|
143
144
|
initialize_logging options[:loglevel].to_s.upcase
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: takeltau
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.44.
|
4
|
+
version: 0.44.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takelwerk
|
@@ -294,6 +294,7 @@ files:
|
|
294
294
|
- lib/takeltau/ship/container/lib.rb
|
295
295
|
- lib/takeltau/ship/container/list.rb
|
296
296
|
- lib/takeltau/ship/container/login.rb
|
297
|
+
- lib/takeltau/ship/container/logs.rb
|
297
298
|
- lib/takeltau/ship/container/podman.rb
|
298
299
|
- lib/takeltau/ship/container/stop.rb
|
299
300
|
- lib/takeltau/ship/container/sudo.rb
|
@@ -304,8 +305,8 @@ files:
|
|
304
305
|
- lib/takeltau/ship/ports/lib.rb
|
305
306
|
- lib/takeltau/ship/ports/list.rb
|
306
307
|
- lib/takeltau/ship/project/cli.rb
|
308
|
+
- lib/takeltau/ship/project/create.rb
|
307
309
|
- lib/takeltau/ship/project/list.rb
|
308
|
-
- lib/takeltau/ship/project/logs.rb
|
309
310
|
- lib/takeltau/ship/project/start.rb
|
310
311
|
- lib/takeltau/version
|
311
312
|
homepage: https://github.com/takelwerk/takelage-cli
|
@@ -313,6 +314,7 @@ licenses:
|
|
313
314
|
- GPL-3.0
|
314
315
|
metadata:
|
315
316
|
yard.run: yard
|
317
|
+
rubygems_mfa_required: 'true'
|
316
318
|
post_install_message:
|
317
319
|
rdoc_options: []
|
318
320
|
require_paths:
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# tau ship project logs
|
4
|
-
module ShipProjectLogs
|
5
|
-
# Start a takelship
|
6
|
-
def ship_project_logs(project)
|
7
|
-
return unless ship_container_check_existing
|
8
|
-
|
9
|
-
takelship = _ship_info_lib_get_takelshipinfo
|
10
|
-
project = _ship_info_lib_get_project(project, takelship)
|
11
|
-
|
12
|
-
return false unless _ship_info_lib_valid_project? takelship, project
|
13
|
-
|
14
|
-
log.debug "Following logs of takelship project \"#{project}\""
|
15
|
-
_ship_project_logs_follow_logs project
|
16
|
-
end
|
17
|
-
|
18
|
-
private
|
19
|
-
|
20
|
-
def _ship_project_logs_follow_logs(project)
|
21
|
-
cmd_follow_logs = format(
|
22
|
-
config.active['cmd_ship_project_follow_logs'],
|
23
|
-
project: project
|
24
|
-
)
|
25
|
-
_ship_container_lib_docker_exec cmd_follow_logs
|
26
|
-
end
|
27
|
-
end
|