takeltau 0.39.2 → 0.39.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/takeltau/default.yml +3 -4
- data/lib/takeltau/docker/container/lib.rb +0 -2
- data/lib/takeltau/docker/image/cli.rb +1 -0
- data/lib/takeltau/docker/image/update.rb +6 -5
- data/lib/takeltau/mutagen/check/daemon.rb +11 -25
- data/lib/takeltau/mutagen/socket/create.rb +0 -2
- data/lib/takeltau/mutagen/socket/docker.rb +0 -2
- data/lib/takeltau/version +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: 7dccbd2450aef1f79fbfc296b79ebed9223848bace7a80ceb8bdc2128a3ef861
|
4
|
+
data.tar.gz: 7f143ed2fd998c2138aac52585561b4f7ad7e890c90d77fd47688a6e5d48b5e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 393eda28103aaa37bfb3538cc7fae38cb23af87473a93253d777cd299e62637b467c202e510acfd80c25ac77ff0cd4c6aa85aa10e95fc608ea512590297acdbf
|
7
|
+
data.tar.gz: d8e1129e3770078994b01a59259a5c3ab85f4be889070ed9c5fda239d4e01cf7f8b8a748c0fb4e8cbc96551636f386ae5d9b20e5ca1e8872a31ee47935868f82
|
data/lib/takeltau/default.yml
CHANGED
@@ -14,7 +14,7 @@ cmd_docker_container_docker_exec: 'docker exec %{container} su %{username} -c "L
|
|
14
14
|
cmd_docker_container_stop_container: 'docker stop %{container}'
|
15
15
|
cmd_docker_image_tag_check_docker_images: 'docker images --quiet %{image}'
|
16
16
|
cmd_docker_image_tag_list_docker_images: 'docker images %{docker_user}\/%{docker_repo} --format "{{.Tag}}"'
|
17
|
-
|
17
|
+
cmd_docker_image_update_docker_pull: 'docker pull %{docker_user}/%{docker_repo}:%{docker_tag}'
|
18
18
|
cmd_docker_image_update_docker_remove_dangling: 'docker image prune --force'
|
19
19
|
cmd_git: 'git'
|
20
20
|
cmd_git_check_clean_git_unstaged: 'git diff --exit-code'
|
@@ -46,7 +46,6 @@ cmd_init_lib_git_commit_initial: 'git commit -m "Initial commit"'
|
|
46
46
|
cmd_init_lib_hg_clone: 'bash hgclone'
|
47
47
|
cmd_mutagen: 'mutagen'
|
48
48
|
cmd_mutagen_check_daemon_host_connection: 'mutagen forward list --label-selector="%{hostlabel}"'
|
49
|
-
cmd_mutagen_check_daemon_version: 'mutagen version'
|
50
49
|
cmd_mutagen_forward_socket_create: 'mutagen forward create --name=%{socketname} --label=%{hostlabel} --label=%{takellabel} docker://%{username}@%{container}:unix:%{containersock} unix:%{hostsock}'
|
51
50
|
cmd_mutagen_forward_socket_docker: 'mutagen forward create --name=%{socketname} --label=%{hostlabel} --label=%{takellabel} --socket-group-source=docker --socket-permission-mode=0660 docker://root@%{container}:unix:/var/run/docker.sock unix:%{hostsock}'
|
52
51
|
cmd_mutagen_forward_socket_check: 'mutagen forward list %{socketname}'
|
@@ -66,11 +65,11 @@ git_hg_branch: 'main'
|
|
66
65
|
info_project_main: 'project.yml'
|
67
66
|
info_project_private: 'private/project.yml'
|
68
67
|
login_wait_for_sockets: '0'
|
69
|
-
mutagen_socket_path_mutagen_container: '~/.mutagen/daemon/daemon.sock'
|
70
|
-
mutagen_socket_path_mutagen_host: '~/.mutagen/daemon/daemon.sock'
|
71
68
|
mutagen_socket_path_docker_host: '/var/run/docker.sock'
|
72
69
|
mutagen_socket_path_gpg_container: '~/.gnupg/S.gpg-agent'
|
73
70
|
mutagen_socket_path_gpg_host: '~/.gnupg/S.gpg-agent'
|
71
|
+
mutagen_socket_path_mutagen_container: '~/.mutagen/daemon/daemon.sock'
|
72
|
+
mutagen_socket_path_mutagen_host: '~/.mutagen/daemon/daemon.sock'
|
74
73
|
mutagen_socket_path_ssh_container: '~/.gnupg/S.gpg-agent.ssh'
|
75
74
|
mutagen_socket_path_ssh_host: '~/.gnupg/S.gpg-agent.ssh'
|
76
75
|
mutagen_socket_takelage_label: 'type=takelage'
|
@@ -8,8 +8,6 @@ module DockerContainerLib
|
|
8
8
|
|
9
9
|
# Create mutagen sockets
|
10
10
|
def _docker_container_lib_start_sockets
|
11
|
-
return false unless mutagen_check_daemon
|
12
|
-
|
13
11
|
mutagen_socket_docker @dockersock_host
|
14
12
|
mutagen_socket_create 'mutagen', @mutagensock_container, @mutagensock_host
|
15
13
|
mutagen_socket_create 'gpg', @gpgsock_container, @gpgsock_host
|
@@ -6,22 +6,23 @@ module DockerImageUpdate
|
|
6
6
|
def docker_image_update
|
7
7
|
return false unless docker_check_daemon
|
8
8
|
|
9
|
-
|
9
|
+
cmd_docker_pull = _docker_image_update_cmd_docker_pull
|
10
10
|
|
11
11
|
cmd_docker_remove_dangling =
|
12
12
|
config.active['cmd_docker_image_update_docker_remove_dangling']
|
13
13
|
|
14
|
-
run_and_exit "#{
|
14
|
+
run_and_exit "#{cmd_docker_pull} && #{cmd_docker_remove_dangling}"
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
18
18
|
|
19
19
|
# Prepare dpcker pull latest command.
|
20
|
-
def
|
20
|
+
def _docker_image_update_cmd_docker_pull
|
21
21
|
format(
|
22
|
-
config.active['
|
22
|
+
config.active['cmd_docker_image_update_docker_pull'],
|
23
23
|
docker_user: @docker_user,
|
24
|
-
docker_repo: @docker_repo
|
24
|
+
docker_repo: @docker_repo,
|
25
|
+
docker_tag: @docker_tag
|
25
26
|
)
|
26
27
|
end
|
27
28
|
end
|
@@ -5,17 +5,18 @@ module MutagenCheckDaemon
|
|
5
5
|
# Backend method for mutagen check daemon.
|
6
6
|
# @return [Boolean] is mutagen available?
|
7
7
|
# rubocop:disable Metrics/MethodLength
|
8
|
+
# rubocop:disable Metrics/AbcSize
|
8
9
|
def mutagen_check_daemon
|
9
10
|
return true if @mutagen_daemon_available
|
10
11
|
|
11
12
|
log.debug 'Check mutagen status'
|
12
13
|
|
13
|
-
return false unless
|
14
|
+
return false unless command_available_else_error? config.active['cmd_mutagen']
|
14
15
|
|
15
|
-
# are we
|
16
|
+
# are we inside a takelage container?
|
16
17
|
unless _docker_container_lib_check_matrjoschka
|
17
|
-
unless
|
18
|
-
log.error 'The mutagen
|
18
|
+
unless _file_exists? config.active['mutagen_socket_path_mutagen_host']
|
19
|
+
log.error 'The mutagen socket path on the host is not available'
|
19
20
|
return false
|
20
21
|
end
|
21
22
|
|
@@ -24,6 +25,11 @@ module MutagenCheckDaemon
|
|
24
25
|
return true
|
25
26
|
end
|
26
27
|
|
28
|
+
unless _file_exists? config.active['mutagen_socket_path_mutagen_container']
|
29
|
+
log.error 'The mutagen socket path in the container is not available'
|
30
|
+
return false
|
31
|
+
end
|
32
|
+
|
27
33
|
unless _mutagen_check_daemon_host_connection
|
28
34
|
log.error 'A mutagen host connection is not available'
|
29
35
|
return false
|
@@ -33,25 +39,11 @@ module MutagenCheckDaemon
|
|
33
39
|
@mutagen_daemon_available = true
|
34
40
|
true
|
35
41
|
end
|
42
|
+
# rubocop:enable Metrics/AbcSize
|
36
43
|
# rubocop:enable Metrics/MethodLength
|
37
44
|
|
38
45
|
private
|
39
46
|
|
40
|
-
# Check mutagen prerequisites
|
41
|
-
def _mutagen_check_check_prerequisites
|
42
|
-
unless _file_exists? config.active['mutagen_socket_path_mutagen_container']
|
43
|
-
log.error 'The mutagen socket path in the container is not available'
|
44
|
-
return false
|
45
|
-
end
|
46
|
-
|
47
|
-
unless _file_exists? config.active['mutagen_socket_path_mutagen_host']
|
48
|
-
log.error 'The mutagen socket path on the host is not available'
|
49
|
-
return false
|
50
|
-
end
|
51
|
-
|
52
|
-
command_available_else_error? config.active['cmd_mutagen']
|
53
|
-
end
|
54
|
-
|
55
47
|
# Check mutagen host connection
|
56
48
|
# rubocop:disable Metrics/MethodLength
|
57
49
|
def _mutagen_check_daemon_host_connection
|
@@ -75,10 +67,4 @@ module MutagenCheckDaemon
|
|
75
67
|
true
|
76
68
|
end
|
77
69
|
# rubocop:enable Metrics/MethodLength
|
78
|
-
|
79
|
-
# Check mutagen version
|
80
|
-
def _mutagen_check_daemon_version
|
81
|
-
version = try config.active['cmd_mutagen_check_daemon_version']
|
82
|
-
version.exitstatus.zero?
|
83
|
-
end
|
84
70
|
end
|
@@ -10,8 +10,6 @@ module MutagenSocketCreate
|
|
10
10
|
log.debug "Create the mutagen socket \"#{socketname}\" in the container " \
|
11
11
|
"at \"#{containersock}\" pointing to the host at \"#{hostsock}\""
|
12
12
|
|
13
|
-
return false unless mutagen_check_daemon
|
14
|
-
|
15
13
|
return false if mutagen_socket_check socketname
|
16
14
|
|
17
15
|
socket_created = _mutagen_socket_create_socket(socketname, containersock, hostsock)
|
@@ -10,8 +10,6 @@ module MutagenSocketDocker
|
|
10
10
|
log.debug "Create the mutagen docker socket \"#{socketname}\" in the container " \
|
11
11
|
"pointing to the host at \"#{hostsock}\""
|
12
12
|
|
13
|
-
return false unless mutagen_check_daemon
|
14
|
-
|
15
13
|
return false if mutagen_socket_check socketname
|
16
14
|
|
17
15
|
socket_created = _mutagen_socket_docker_socket(socketname, hostsock)
|
data/lib/takeltau/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.39.
|
1
|
+
0.39.18
|