sct 0.1.31 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cluster/lib/cluster/runner.rb +27 -3
- data/sct/lib/sct/version.rb +1 -1
- 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: b2e41b42a8946aed6b8dbe5433b5c3ee3c81bff9d067468bbb1918a6e2c68923
|
4
|
+
data.tar.gz: 5ccbfd3297e07405b088c5ee403ee03bad743e8fa35503c3edf4d609e31ca9a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 526a75d3b045b8f627a41fe54f7ddae8bf953c132e609371469059955769c7f13b4e87d0dbf8e0c8d3994d5cbf4bcbbb8d01ed3d4fb604f12deea3eccc80eebf
|
7
|
+
data.tar.gz: 89e5331e801bdacb9b8ce26ff4077bee6c9a86c51793cc7152680e4f684e455785e0186fb1045306316dac3eb6455580d1cf1c646db816e64b690dd26715f3da
|
@@ -19,6 +19,9 @@ module Cluster
|
|
19
19
|
wait_for_ingress_ip
|
20
20
|
run_command "kubectl apply -f ~/development/spend-cloud/k8s/dependencies.yml"
|
21
21
|
wait_for_pods
|
22
|
+
create_keycloak_database_user
|
23
|
+
run_command "kubectl apply -f ~/development/spend-cloud/k8s/keycloak-server.yml"
|
24
|
+
wait_for_pods
|
22
25
|
run_command "kubectl apply -f ~/development/spend-cloud/k8s/"
|
23
26
|
end
|
24
27
|
|
@@ -89,7 +92,7 @@ module Cluster
|
|
89
92
|
|
90
93
|
def start_cluster
|
91
94
|
if SctCore::Helper.operatingSystem == SctCore::Helper::MAC_OS
|
92
|
-
run_command "minikube start --driver=
|
95
|
+
run_command "minikube start --driver=hyperkit --vm=true --cpus=$(sysctl -n hw.ncpu) --memory=8G"
|
93
96
|
else
|
94
97
|
run_command "minikube start --driver=docker --cpus=$(cat /proc/cpuinfo | grep processor | wc -l) --memory=3G"
|
95
98
|
end
|
@@ -99,9 +102,13 @@ module Cluster
|
|
99
102
|
def post_start
|
100
103
|
wait_for_pods
|
101
104
|
copy_proactive_accounts_file
|
102
|
-
|
105
|
+
if SctCore::Helper.operatingSystem != SctCore::Helper::WINDOWS
|
106
|
+
UI.success("\nAdding SSH tunnel to port 443!")
|
107
|
+
run_command "sudo ssh -f -N -i $(minikube ssh-key) docker@$(minikube ip) -L 443:127.0.0.1:443"
|
108
|
+
end
|
109
|
+
# run_command "sudo sct hostfile"
|
103
110
|
run_command "minikube tunnel &", { out: "/dev/null", err: "/dev/null" } if SctCore::Helper::is_windows? # leave this running detached forever in the background
|
104
|
-
UI.success("\n✔️ You can visit your environment at 👉 https://spend-cloud.spend.cloud
|
111
|
+
UI.success("\n✔️ You can visit your environment at 👉 https://spend-cloud.dev.spend.cloud 👌")
|
105
112
|
end
|
106
113
|
|
107
114
|
def enable_addons
|
@@ -310,6 +317,23 @@ module Cluster
|
|
310
317
|
UI.success("ProActive accounts file is available")
|
311
318
|
end
|
312
319
|
|
320
|
+
def create_keycloak_database_user
|
321
|
+
container_name = "mysql-service"
|
322
|
+
pod_id = pods().select {|pod| pod[:name].start_with?(container_name)}.first[:name]
|
323
|
+
|
324
|
+
UI.important("Creating keycloak user")
|
325
|
+
create_user = "CREATE USER 'keycloak'@'%' IDENTIFIED BY 'keycloak';"
|
326
|
+
run_command "kubectl exec #{pod_id} -- mysql -e '#{create_user}' >> /dev/null"
|
327
|
+
|
328
|
+
UI.important("Creating keycloak database")
|
329
|
+
create_database = "CREATE DATABASE keycloak CHARACTER SET utf8 COLLATE UTF8_UNICODE_CI;"
|
330
|
+
run_command "kubectl exec #{pod_id} -- mysql -e '#{create_database}' >> /dev/null"
|
331
|
+
|
332
|
+
UI.important("Granting privileges to keycloak user")
|
333
|
+
grant_privileges = "GRANT ALL PRIVILEGES ON keycloak.* TO 'keycloak'@'%';"
|
334
|
+
run_command "kubectl exec #{pod_id} -- mysql -e '#{grant_privileges}' >> /dev/null"
|
335
|
+
end
|
336
|
+
|
313
337
|
def run_command command, options = {}
|
314
338
|
if ! system command, options
|
315
339
|
raise command.red
|
data/sct/lib/sct/version.rb
CHANGED
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.33
|
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-12-
|
11
|
+
date: 2020-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -242,9 +242,9 @@ post_install_message:
|
|
242
242
|
rdoc_options: []
|
243
243
|
require_paths:
|
244
244
|
- cluster/lib
|
245
|
-
- shell/lib
|
246
245
|
- sct/lib
|
247
246
|
- sct_core/lib
|
247
|
+
- shell/lib
|
248
248
|
required_ruby_version: !ruby/object:Gem::Requirement
|
249
249
|
requirements:
|
250
250
|
- - ">="
|
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
256
|
- !ruby/object:Gem::Version
|
257
257
|
version: '0'
|
258
258
|
requirements: []
|
259
|
-
rubygems_version: 3.
|
259
|
+
rubygems_version: 3.1.2
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: Spend Cloud Tool.
|