sct 0.1.22 → 0.1.27
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/cluster/lib/.DS_Store +0 -0
- data/cluster/lib/cluster.rb +0 -0
- data/cluster/lib/cluster/commands_generator.rb +10 -10
- data/cluster/lib/cluster/module.rb +0 -0
- data/cluster/lib/cluster/resources/.DS_Store +0 -0
- data/cluster/lib/cluster/resources/corefile.yml +0 -0
- data/cluster/lib/cluster/runner.rb +7 -15
- data/sct/lib/.DS_Store +0 -0
- data/sct/lib/sct.rb +0 -0
- data/sct/lib/sct/.DS_Store +0 -0
- data/sct/lib/sct/cli_tools_distributor.rb +0 -0
- data/sct/lib/sct/command.rb +0 -0
- data/sct/lib/sct/commands/hostfile.rb +4 -0
- data/sct/lib/sct/commands/init.rb +0 -0
- data/sct/lib/sct/commands/mysqlproxy.rb +0 -0
- data/sct/lib/sct/commands_generator.rb +14 -0
- data/sct/lib/sct/tools.rb +0 -0
- data/sct/lib/sct/version.rb +1 -1
- data/sct_core/lib/.DS_Store +0 -0
- data/sct_core/lib/sct_core.rb +0 -0
- data/sct_core/lib/sct_core/.DS_Store +0 -0
- data/sct_core/lib/sct_core/command_executor.rb +0 -0
- data/sct_core/lib/sct_core/config.rb +0 -0
- data/sct_core/lib/sct_core/core_ext/string.rb +0 -0
- data/sct_core/lib/sct_core/helper.rb +11 -3
- data/sct_core/lib/sct_core/module.rb +0 -0
- data/sct_core/lib/sct_core/sct_pty.rb +0 -0
- data/sct_core/lib/sct_core/ui/implementations/shell.rb +0 -0
- data/sct_core/lib/sct_core/ui/interface.rb +0 -0
- data/sct_core/lib/sct_core/ui/ui.rb +0 -0
- data/sct_core/lib/sct_core/update_checker/update_checker.rb +0 -0
- data/shell/README.md +0 -0
- data/shell/lib/shell.rb +0 -0
- data/shell/lib/shell/ClassLevelInheritableAttributes.rb +0 -0
- data/shell/lib/shell/commands_generator.rb +0 -0
- data/shell/lib/shell/docker/composer.rb +5 -5
- data/shell/lib/shell/docker/docker.rb +48 -29
- data/shell/lib/shell/docker/php.rb +53 -8
- data/shell/lib/shell/docker/yarn.rb +6 -6
- data/shell/lib/shell/module.rb +0 -0
- data/shell/lib/shell/runner.rb +0 -0
- data/shell/lib/shell/tools.rb +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff08000486ce837ef860abef5066f502d812fa618aee9cdc4ff1675de5e1db99
|
4
|
+
data.tar.gz: 82bb9f318eb66683a659df692022039b2c9e27896190f4d40273fb27d375b095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ec72ba0beb92e34c15e78a8d8ea8f25dc896ea783acf7404860bea66434c6c875ca41636e76f096024497badecadbb53917d5941eced8687e0df4076e00bb29
|
7
|
+
data.tar.gz: 13360a17d8c27c6cd6707585a35fd0c13503296be34b2f8a9fe918f9470e6f40c68a5d4c3c7af319d00e7de66c12553b67710d7a3da1a65dcd3ce173dba3bfac
|
data/cluster/lib/.DS_Store
CHANGED
File without changes
|
data/cluster/lib/cluster.rb
CHANGED
File without changes
|
@@ -9,7 +9,7 @@ module Cluster
|
|
9
9
|
self.new.run
|
10
10
|
end
|
11
11
|
|
12
|
-
def run
|
12
|
+
def run
|
13
13
|
program :name, 'cluster'
|
14
14
|
program :version, Sct::VERSION
|
15
15
|
program :description, 'CLI for \'cluster\' - Manage your local kubernetes cluster'
|
@@ -22,8 +22,8 @@ module Cluster
|
|
22
22
|
c.description = "Start the cluster"
|
23
23
|
c.option '--clean', 'start a clean cluster. Old cluster will be purged if available.'
|
24
24
|
|
25
|
-
c.action do |args, options|
|
26
|
-
if options.clean
|
25
|
+
c.action do |args, options|
|
26
|
+
if options.clean
|
27
27
|
Cluster::Runner.new.reset
|
28
28
|
else
|
29
29
|
Cluster::Runner.new.launch
|
@@ -37,17 +37,17 @@ module Cluster
|
|
37
37
|
c.syntax = 'sct cluster down'
|
38
38
|
c.description = 'stop the cluster'
|
39
39
|
|
40
|
-
c.action do |args, options|
|
40
|
+
c.action do |args, options|
|
41
41
|
Cluster::Runner.new.down
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
command :reset do |c|
|
45
|
+
command :reset do |c|
|
46
46
|
|
47
47
|
c.syntax = 'sct cluster reset'
|
48
48
|
c.description = 'reset your cluster and start with a clean cluster'
|
49
49
|
|
50
|
-
c.action do |args, options|
|
50
|
+
c.action do |args, options|
|
51
51
|
Cluster::Runner.new.reset
|
52
52
|
end
|
53
53
|
end
|
@@ -59,13 +59,13 @@ module Cluster
|
|
59
59
|
c.syntax = 'sct cluster status'
|
60
60
|
c.description = 'see the status of your cluster'
|
61
61
|
|
62
|
-
c.action do |args, options|
|
62
|
+
c.action do |args, options|
|
63
63
|
Cluster::Runner.new.status
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
67
|
command :'update config' do |c|
|
68
|
-
|
68
|
+
|
69
69
|
c.syntax = 'sct cluster update config'
|
70
70
|
c.description = 'update the cluster configuration'
|
71
71
|
|
@@ -84,7 +84,7 @@ module Cluster
|
|
84
84
|
|
85
85
|
Cluster::Runner.new.delete_stalled_pods if options.stalled
|
86
86
|
Cluster::Runner.new.delete_all_pods if options.all
|
87
|
-
|
87
|
+
|
88
88
|
Cluster::Runner.new.delete_pods(args) if !args.empty?
|
89
89
|
|
90
90
|
end
|
@@ -106,4 +106,4 @@ module Cluster
|
|
106
106
|
run!
|
107
107
|
end
|
108
108
|
end
|
109
|
-
end
|
109
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -11,11 +11,11 @@ module Cluster
|
|
11
11
|
|
12
12
|
def start_cluster
|
13
13
|
if SctCore::Helper.operatingSystem == SctCore::Helper::MAC_OS
|
14
|
-
run_command "#{minikube} start --cpus=$(sysctl -n hw.ncpu) --memory=8G"
|
14
|
+
run_command "#{SctCore::Helper.minikube} start --cpus=$(sysctl -n hw.ncpu) --memory=8G"
|
15
15
|
else
|
16
|
-
run_command "#{minikube} start --cpus=$(cat /proc/cpuinfo | grep processor | wc -l) --memory=10G"
|
16
|
+
run_command "#{SctCore::Helper.minikube} start --cpus=$(cat /proc/cpuinfo | grep processor | wc -l) --memory=10G"
|
17
17
|
end
|
18
|
-
run_command "#{minikube} ssh -- 'sudo su -c \"echo 10048576 > /proc/sys/fs/inotify/max_user_watches\"'"
|
18
|
+
run_command "#{SctCore::Helper.minikube} ssh -- 'sudo su -c \"echo 10048576 > /proc/sys/fs/inotify/max_user_watches\"'"
|
19
19
|
update_config
|
20
20
|
end
|
21
21
|
|
@@ -26,11 +26,11 @@ module Cluster
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def down
|
29
|
-
run_command "#{minikube} stop"
|
29
|
+
run_command "#{SctCore::Helper.minikube} stop"
|
30
30
|
end
|
31
31
|
|
32
32
|
def reset
|
33
|
-
run_command "#{minikube} delete"
|
33
|
+
run_command "#{SctCore::Helper.minikube} delete"
|
34
34
|
start_cluster
|
35
35
|
create_secrets
|
36
36
|
enable_addons
|
@@ -49,7 +49,7 @@ module Cluster
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def enable_addon(addon)
|
52
|
-
run_command "#{minikube} addons enable #{addon}"
|
52
|
+
run_command "#{SctCore::Helper.minikube} addons enable #{addon}"
|
53
53
|
|
54
54
|
deployment = deployments("kube-system").find { |deployment| deployment[:name].include? addon }
|
55
55
|
|
@@ -228,7 +228,7 @@ module Cluster
|
|
228
228
|
end
|
229
229
|
|
230
230
|
def get_minikube_status
|
231
|
-
output = `#{minikube} status`
|
231
|
+
output = `#{SctCore::Helper.minikube} status`
|
232
232
|
|
233
233
|
lines = output.split "\n"
|
234
234
|
|
@@ -262,13 +262,5 @@ module Cluster
|
|
262
262
|
raise command.red
|
263
263
|
end
|
264
264
|
end
|
265
|
-
|
266
|
-
def minikube
|
267
|
-
if SctCore::Helper.operatingSystem == SctCore::Helper::WINDOWS
|
268
|
-
return "minikube.exe"
|
269
|
-
else
|
270
|
-
return "minikube"
|
271
|
-
end
|
272
|
-
end
|
273
265
|
end
|
274
266
|
end
|
data/sct/lib/.DS_Store
CHANGED
File without changes
|
data/sct/lib/sct.rb
CHANGED
File without changes
|
data/sct/lib/sct/.DS_Store
CHANGED
File without changes
|
File without changes
|
data/sct/lib/sct/command.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
@@ -50,6 +50,20 @@ module Sct
|
|
50
50
|
|
51
51
|
end
|
52
52
|
|
53
|
+
command :'cluster' do |c|
|
54
|
+
|
55
|
+
c.syntax = 'sct cluster'
|
56
|
+
c.description = 'make changes to the cluster'
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
command :'shell' do |c|
|
61
|
+
|
62
|
+
c.syntax = 'sct shell'
|
63
|
+
c.description = 'run commands from the shell using docker containers'
|
64
|
+
|
65
|
+
end
|
66
|
+
|
53
67
|
run!
|
54
68
|
end
|
55
69
|
end
|
data/sct/lib/sct/tools.rb
CHANGED
File without changes
|
data/sct/lib/sct/version.rb
CHANGED
data/sct_core/lib/.DS_Store
CHANGED
File without changes
|
data/sct_core/lib/sct_core.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -35,10 +35,10 @@ module SctCore
|
|
35
35
|
def self.operatingSystem
|
36
36
|
proc = `uname -a`
|
37
37
|
|
38
|
-
case proc
|
39
|
-
when /
|
38
|
+
case proc.downcase
|
39
|
+
when /microsoft/
|
40
40
|
os = WINDOWS
|
41
|
-
when /
|
41
|
+
when /darwin/
|
42
42
|
os = MAC_OS
|
43
43
|
else
|
44
44
|
os = UBUNTU
|
@@ -86,5 +86,13 @@ module SctCore
|
|
86
86
|
def self.isSudo
|
87
87
|
return !ENV["SUDO_USER"].nil? && !ENV["SUDO_USER"].empty?
|
88
88
|
end
|
89
|
+
|
90
|
+
def self.minikube
|
91
|
+
if self.operatingSystem == WINDOWS
|
92
|
+
return "minikube.exe"
|
93
|
+
else
|
94
|
+
return "minikube"
|
95
|
+
end
|
96
|
+
end
|
89
97
|
end
|
90
98
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/shell/README.md
CHANGED
File without changes
|
data/shell/lib/shell.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
@@ -6,11 +6,11 @@ module Shell
|
|
6
6
|
|
7
7
|
# Configure the Yarn command
|
8
8
|
def self.config
|
9
|
-
self.
|
10
|
-
self.
|
11
|
-
self.
|
12
|
-
self.
|
13
|
-
self.
|
9
|
+
self.set_image("eu.gcr.io/dev-pasc-vcdm/helpers-composer:latest", true)
|
10
|
+
self.set_pwd_as_volume("/app")
|
11
|
+
self.add_volume(SctCore::Helper.convertWSLToWindowsPath("#{SctCore::Helper.windowsHomePath || SctCore::Helper.homePath}/.composer") , "/tmp")
|
12
|
+
self.set_current_user_and_group()
|
13
|
+
self.set_entrypoint("composer")
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -4,7 +4,7 @@ require "shell/ClassLevelInheritableAttributes"
|
|
4
4
|
module Shell
|
5
5
|
class Docker
|
6
6
|
include ClassLevelInheritableAttributes
|
7
|
-
inheritable_attributes :image, :is_private_registry, :entrypoint, :volumes, :ports, :extra_arguments
|
7
|
+
inheritable_attributes :image, :is_private_registry, :entrypoint, :volumes, :ports, :extra_arguments, :env_variables
|
8
8
|
|
9
9
|
@image = nil
|
10
10
|
@is_private_registry = false
|
@@ -14,6 +14,7 @@ module Shell
|
|
14
14
|
@ports = {}
|
15
15
|
@user_group = []
|
16
16
|
@extra_arguments = {}
|
17
|
+
@env_variables = {}
|
17
18
|
|
18
19
|
###
|
19
20
|
# The Docker command configuration. This has to be able to execute the command properly
|
@@ -27,28 +28,28 @@ module Shell
|
|
27
28
|
###
|
28
29
|
def self.exec(cli_arguments)
|
29
30
|
|
30
|
-
self.
|
31
|
+
self.add_extra_argument(cli_arguments)
|
31
32
|
|
32
|
-
self.config
|
33
|
+
self.config
|
33
34
|
|
34
35
|
# Check if the basic variables are set
|
35
36
|
if !@image || @image.empty?
|
36
37
|
raise LoadError, "The required image is not defined for this command"
|
37
38
|
end
|
38
39
|
|
39
|
-
if !self.
|
40
|
-
|
40
|
+
if !self.check_for_image && @is_private_registry
|
41
|
+
unless self.login_to_private_registry
|
41
42
|
raise RuntimeError, "Could not authenticate to GCR (" + $?.exitstatus + ")"
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
45
|
-
self.
|
46
|
+
self.run_command
|
46
47
|
end
|
47
48
|
|
48
49
|
###
|
49
50
|
# The image for this Docker command
|
50
51
|
###
|
51
|
-
def self.
|
52
|
+
def self.set_image(image, is_private_registry=false)
|
52
53
|
@image = image
|
53
54
|
@is_private_registry = is_private_registry
|
54
55
|
end
|
@@ -56,27 +57,27 @@ module Shell
|
|
56
57
|
###
|
57
58
|
# Set the current PWD as a volume on the specified path in the container
|
58
59
|
###
|
59
|
-
def self.
|
60
|
+
def self.set_pwd_as_volume(volume_path)
|
60
61
|
pwd = `pwd -P`
|
61
62
|
|
62
63
|
if SctCore::Helper.operatingSystem == SctCore::Helper::WINDOWS
|
63
64
|
pwd=SctCore::Helper.convertWSLToWindowsPath(pwd)
|
64
65
|
end
|
65
66
|
|
66
|
-
|
67
|
+
add_volume(pwd, volume_path)
|
67
68
|
end
|
68
69
|
|
69
70
|
###
|
70
71
|
# Add an extra volume in the container
|
71
72
|
###
|
72
|
-
def self.
|
73
|
-
@volumes[
|
73
|
+
def self.add_volume(local_path, volume_path)
|
74
|
+
@volumes[local_path] = volume_path
|
74
75
|
end
|
75
76
|
|
76
77
|
###
|
77
78
|
# Add a port mapping for the container
|
78
79
|
###
|
79
|
-
def self.
|
80
|
+
def self.map_port(external_port, container_port = nil)
|
80
81
|
|
81
82
|
external_port=String(external_port)
|
82
83
|
container_port=String(container_port)
|
@@ -91,7 +92,7 @@ module Shell
|
|
91
92
|
###
|
92
93
|
# Set the current user and group in the container
|
93
94
|
###
|
94
|
-
def self.
|
95
|
+
def self.set_current_user_and_group
|
95
96
|
@user_group = []
|
96
97
|
@user_group << `id -u`
|
97
98
|
@user_group << `id -g`
|
@@ -100,14 +101,14 @@ module Shell
|
|
100
101
|
###
|
101
102
|
# Set the entrypoint for the command in the container
|
102
103
|
###
|
103
|
-
def self.
|
104
|
+
def self.set_entrypoint(entrypoint)
|
104
105
|
@entrypoint=entrypoint
|
105
106
|
end
|
106
107
|
|
107
108
|
###
|
108
109
|
# Add extra arguments to be configured for the container
|
109
110
|
###
|
110
|
-
def self.
|
111
|
+
def self.add_extra_argument(argument, value=nil)
|
111
112
|
argument = String(argument)
|
112
113
|
|
113
114
|
if value
|
@@ -117,10 +118,17 @@ module Shell
|
|
117
118
|
self.extra_arguments[argument] = value
|
118
119
|
end
|
119
120
|
|
121
|
+
###
|
122
|
+
# Set environment variables for the container
|
123
|
+
###
|
124
|
+
def self.set_environment_variables(env_variables)
|
125
|
+
@env_variables = env_variables
|
126
|
+
end
|
127
|
+
|
120
128
|
###
|
121
129
|
# Check if the image is already present in the system
|
122
130
|
###
|
123
|
-
def self.
|
131
|
+
def self.check_for_image
|
124
132
|
image_list=`docker images -q #{@image} 2> /dev/null`
|
125
133
|
|
126
134
|
return image_list && !image_list.empty?
|
@@ -129,7 +137,7 @@ module Shell
|
|
129
137
|
###
|
130
138
|
# Login to the private container registry with the cloud credentials
|
131
139
|
###
|
132
|
-
def self.
|
140
|
+
def self.login_to_private_registry
|
133
141
|
`docker login -u oauth2accesstoken -p "$(gcloud auth application-default print-access-token)" https://eu.gcr.io &> /dev/null`
|
134
142
|
return $?.success?
|
135
143
|
end
|
@@ -137,8 +145,8 @@ module Shell
|
|
137
145
|
###
|
138
146
|
# Run the command
|
139
147
|
###
|
140
|
-
def self.
|
141
|
-
command = self.
|
148
|
+
def self.run_command
|
149
|
+
command = self.compile_command
|
142
150
|
|
143
151
|
SctCore::CommandExecutor.execute(command: command, print_all: true, suppress_output: false)
|
144
152
|
end
|
@@ -146,42 +154,53 @@ module Shell
|
|
146
154
|
###
|
147
155
|
# Compile the command with all options
|
148
156
|
###
|
149
|
-
def self.
|
157
|
+
def self.compile_command
|
150
158
|
# Basic docker run command
|
151
|
-
command = self.
|
159
|
+
command = self.add_to_command_string("" , "docker run --rm -it")
|
160
|
+
|
161
|
+
# Attach environment variables
|
162
|
+
if @env_variables
|
163
|
+
@env_variables.each do |key, value|
|
164
|
+
if value && !value.empty?
|
165
|
+
command = self.add_to_command_string(command, "-e " + key+"="+value)
|
166
|
+
else
|
167
|
+
command = self.add_to_command_string("-e " + key, value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
152
171
|
|
153
172
|
# Attach configured volumes
|
154
173
|
if @volumes
|
155
174
|
@volumes.each do |local_path, container_path|
|
156
|
-
command = self.
|
175
|
+
command = self.add_to_command_string(command, "--volume " + local_path +":"+ container_path)
|
157
176
|
end
|
158
177
|
end
|
159
178
|
|
160
179
|
# Map configured ports
|
161
180
|
if @ports
|
162
181
|
@ports.each do |external_port, container_port|
|
163
|
-
command = self.
|
182
|
+
command = self.add_to_command_string(command, "-p " + external_port +":"+ container_port)
|
164
183
|
end
|
165
184
|
end
|
166
185
|
|
167
186
|
if @user_group
|
168
|
-
command = self.
|
187
|
+
command = self.add_to_command_string(command, "--user "+ String(@user_group.shift) +":"+ String(@user_group.shift))
|
169
188
|
end
|
170
189
|
|
171
190
|
# Add image to command
|
172
|
-
command = self.
|
191
|
+
command = self.add_to_command_string(command, @image)
|
173
192
|
|
174
193
|
if @entrypoint
|
175
|
-
command = self.
|
194
|
+
command = self.add_to_command_string(command, String(@entrypoint))
|
176
195
|
end
|
177
196
|
|
178
197
|
# Append arguments and options to command
|
179
198
|
if @extra_arguments
|
180
199
|
@extra_arguments.each do |argument, value|
|
181
200
|
if value && !value.empty?
|
182
|
-
command = self.
|
201
|
+
command = self.add_to_command_string(command, argument+"="+value)
|
183
202
|
else
|
184
|
-
command = self.
|
203
|
+
command = self.add_to_command_string(command, argument)
|
185
204
|
end
|
186
205
|
end
|
187
206
|
end
|
@@ -192,7 +211,7 @@ module Shell
|
|
192
211
|
###
|
193
212
|
# Append a part to the command string and remove any unwanted characters
|
194
213
|
###
|
195
|
-
def self.
|
214
|
+
def self.add_to_command_string(command_string, append)
|
196
215
|
return command_string + append.gsub(/\r?\n/, "") + " "
|
197
216
|
end
|
198
217
|
end
|
@@ -1,15 +1,60 @@
|
|
1
1
|
require "sct_core"
|
2
|
+
|
2
3
|
require_relative "docker"
|
3
4
|
|
4
5
|
module Shell
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
class Php < Docker
|
7
|
+
|
8
|
+
attr_accessor :make
|
9
|
+
|
10
|
+
# Configure the Yarn command
|
11
|
+
def self.config
|
12
|
+
self.set_image("eu.gcr.io/dev-pasc-vcdm/proactive-base:latest", true)
|
13
|
+
self.set_pwd_as_volume("/var/www")
|
14
|
+
self.set_current_user_and_group
|
15
|
+
self.set_entrypoint("php")
|
16
|
+
self.set_environment_variables(self.get_environment_variables)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.get_environment_variables
|
20
|
+
environment_variables = {}
|
21
|
+
environment_variables.store("ENVIRONMENT", "local")
|
22
|
+
|
23
|
+
environment_variables = self.add_service_ip_and_port(environment_variables)
|
24
|
+
|
25
|
+
return environment_variables
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.add_service_ip_and_port(environment_variables)
|
29
|
+
service_names = %w[mysql-service redis-service]
|
30
|
+
|
31
|
+
minikube_status
|
32
|
+
|
33
|
+
service_names.each { |service_name|
|
34
|
+
url = `#{SctCore::Helper.minikube} service #{service_name} --url`
|
35
|
+
|
36
|
+
ip_and_port = url.match /(?<ip>[0-9]+(?:\.[0-9]+){3}):(?<port>[0-9]+)/
|
37
|
+
|
38
|
+
case service_name
|
39
|
+
when "mysql-service"
|
40
|
+
environment_variables.store("DB_HOST", ip_and_port[:ip])
|
41
|
+
environment_variables.store("DB_PORT", ip_and_port[:port])
|
42
|
+
when "redis-service"
|
43
|
+
environment_variables.store("REDIS_HOST", ip_and_port[:ip])
|
44
|
+
environment_variables.store("REDIS_PORT", ip_and_port[:port])
|
13
45
|
end
|
46
|
+
}
|
47
|
+
|
48
|
+
return environment_variables
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.minikube_status
|
52
|
+
output = `#{SctCore::Helper.minikube} status`
|
53
|
+
|
54
|
+
if output.scan(/Running/).length != 3 && output.scan(/Configured/).length != 1
|
55
|
+
UI.important("Please check your minikube status. If all services are stopped you should start the minikube first.")
|
56
|
+
exit
|
57
|
+
end
|
14
58
|
end
|
59
|
+
end
|
15
60
|
end
|
@@ -6,12 +6,12 @@ module Shell
|
|
6
6
|
|
7
7
|
# Configure the Yarn command
|
8
8
|
def self.config
|
9
|
-
self.
|
10
|
-
self.
|
11
|
-
self.
|
12
|
-
self.
|
13
|
-
self.
|
14
|
-
self.
|
9
|
+
self.set_image("eu.gcr.io/dev-pasc-vcdm/helpers-yarn:latest", true)
|
10
|
+
self.set_pwd_as_volume("/app")
|
11
|
+
self.add_volume(SctCore::Helper.convertWSLToWindowsPath("#{SctCore::Helper.windowsHomePath || SctCore::Helper.homePath}/.cache") , "/.cache")
|
12
|
+
self.map_port(8081, 8080)
|
13
|
+
self.map_port(9001)
|
14
|
+
self.set_current_user_and_group()
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/shell/lib/shell/module.rb
CHANGED
File without changes
|
data/shell/lib/shell/runner.rb
CHANGED
File without changes
|
data/shell/lib/shell/tools.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reshad Farid
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -249,9 +249,9 @@ post_install_message:
|
|
249
249
|
rdoc_options: []
|
250
250
|
require_paths:
|
251
251
|
- cluster/lib
|
252
|
-
- shell/lib
|
253
252
|
- sct/lib
|
254
253
|
- sct_core/lib
|
254
|
+
- shell/lib
|
255
255
|
required_ruby_version: !ruby/object:Gem::Requirement
|
256
256
|
requirements:
|
257
257
|
- - ">="
|
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
263
|
- !ruby/object:Gem::Version
|
264
264
|
version: '0'
|
265
265
|
requirements: []
|
266
|
-
rubygems_version: 3.0.
|
266
|
+
rubygems_version: 3.0.6
|
267
267
|
signing_key:
|
268
268
|
specification_version: 4
|
269
269
|
summary: Spend Cloud Tool.
|