Skip to content
This repository was archived by the owner on Feb 21, 2023. It is now read-only.

Commit 8d55283

Browse files
authored
Merge pull request #65 from kf5i/add_init_command
[feat:] Adding init command
2 parents 56a23d8 + 2cbe18d commit 8d55283

File tree

17 files changed

+719
-5
lines changed

17 files changed

+719
-5
lines changed

cmd/tools/cli/cli.go

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func setupCli(baseCmd *cobra.Command) {
4343

4444
baseCmd.AddCommand(newDeleteCommand())
4545
baseCmd.AddCommand(newListCommand())
46+
baseCmd.AddCommand(newInitCommand())
4647
}
4748

4849
//Execute is the entrypoint of the commands

cmd/tools/cli/init.go

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
package cli
2+
3+
import (
4+
5+
//"os"
6+
// "runtime"
7+
// "strings"
8+
// "time"
9+
10+
// "github.com/enescakir/emoji"
11+
"github.com/kf5i/k3ai-core/internal/infra/cloud"
12+
"github.com/kf5i/k3ai-core/internal/infra/local"
13+
14+
//"fmt"
15+
16+
"github.com/kf5i/k3ai-core/internal/shared"
17+
// "github.com/manifoldco/promptui"
18+
//"fmt"
19+
20+
"github.com/spf13/cobra"
21+
)
22+
23+
const absPath = "$HOME/.k3ai/config.yaml"
24+
25+
var kubeconfig []byte
26+
27+
/* First step is to check if inside .k3ai folder exist a copy of config.yaml if not pull one from github
28+
// the default one disabled locally with no plugins and will ask user what want to do.
29+
// based on user choices will enable the right configuration on the config
30+
// finally will instruct the user on how to change the config */
31+
32+
func newInitCommand() *cobra.Command {
33+
34+
var initCmd = &cobra.Command{
35+
Use: "init",
36+
Short: "Initialize K3ai Client",
37+
Long: `Initialize K3ai Client, allowing user to deploy a new K8's cluster, list plugins and groups`,
38+
Example: `k3ai-cli init #Will use config from $HOME/.k3ai/config.yaml and use interactive menus
39+
k3ai-cli init --config /myfolder/myconfig.yaml #Use a custom config.yaml in another location(local or remote)
40+
k3ai-cli init --local k3s #Use config target marked local and of type k3s
41+
k3ai-cli init --cloud civo #Use config target marked as cloud and of type civo`,
42+
SilenceUsage: true,
43+
}
44+
45+
initCmd.Flags().String("local", "", "Options availabe k3s,k0s,kind")
46+
initCmd.Flags().String("cloud", "", "Options availabe for cloud providers")
47+
initCmd.Flags().String("config", "/.k3ai/config.yaml", "Custom config file [default is $HOME/.k3ai/config.yaml]")
48+
49+
initCmd.RunE = func(cmd *cobra.Command, args []string) error {
50+
localConfig, _ := initCmd.Flags().GetString("config")
51+
//localClusterConfig, _ := initCmd.Flags().GetString("local")
52+
remoteClusterConfig, _ := initCmd.Flags().GetString("cloud")
53+
if remoteClusterConfig != "" {
54+
cloud.CivoCloudInit("windows", "civo")
55+
}
56+
57+
//check if config.yaml exist otherwise grab a copy
58+
cfg, _ := shared.Init(localConfig)
59+
for i := range cfg.TargetCustomization {
60+
if cfg.TargetCustomization[i].Enabled {
61+
//check type call relative function: prepare the data we need and push to the relative function
62+
if cfg.TargetCustomization[i].ClusterDeployment == "cloud" {
63+
cloud.Init(cfg.TargetCustomization[i])
64+
} else {
65+
local.Init(cfg.TargetCustomization[i])
66+
}
67+
}
68+
// we assume everything is false (first time?) so we need a simple interactive menu
69+
}
70+
return nil
71+
}
72+
return initCmd
73+
}

configs/config.yaml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
kind: cluster
2+
targetCustomizations:
3+
- name: localK3s #name of the cluster instance not the name of the cluster
4+
enabled: false
5+
type: k3s
6+
config: "/etc/rancher/k3s/k3s.yaml" #default location of config file or your existing config file to copy
7+
clusterName: demo-wsl-k3s #name of the cluster (this need to be the same as in a config file)
8+
clusterDeployment: local
9+
clusterStart: "sudo bash -ic 'k3s server --write-kubeconfig-mode 644 > /dev/null 2>&1 &'"
10+
spec:
11+
# If the OS is not needed may be removed so the three below are mutually exclusive, if not needed set them to null or remove it
12+
wsl: "https://github.com/rancher/k3s/releases/download/v1.19.4%2Bk3s1/k3s"
13+
mac:
14+
linux: "https://get.k3s.io | K3S_KUBECONFIG_MODE=644 sh -s -"
15+
windows:
16+
# Everything from this repo will be ran in this cluster. You trust me right?
17+
plugins:
18+
- repo:
19+
name:
20+
- repo:
21+
name:
22+
23+
- name: localK0s #name of the cluster instance not the name of the cluster
24+
enabled: false
25+
type: k0s
26+
config: "${HOME}/.k3ai/kubeconfig" #default location of config file or your existing config file to copy
27+
clusterName: demo-wsl-k0s #name of the cluster (this need to be the same as in a config file)
28+
clusterDeployment: local
29+
clusterStart: "k0s default-config | tee ${HOME}/.k3ai/k0s.yaml && sudo bash -ic 'k0s server -c ${HOME}/.k3ai/k0s.yaml --enable-worker > /dev/null 2>&1 &' && sudo cat /var/lib/k0s/pki/admin.conf > $HOME/.k3ai/k0s-config"
30+
spec:
31+
# If the OS is not needed may be removed so the three below are mutually exclusive, if not needed set them to null or remove it
32+
wsl: "https://github.com/k0sproject/k0s/releases/download/v0.8.1/k0s-v0.8.1-amd64"
33+
mac:
34+
linux: "https://github.com/k0sproject/k0s/releases/download/v0.8.1/k0s-v0.8.1-amd64"
35+
windows:
36+
# Everything from this repo will be ran in this cluster. You trust me right?
37+
plugins:
38+
- repo:
39+
name:
40+
- repo:
41+
name:
42+
43+
- name: localKind #name of the cluster instance not the name of the cluster
44+
enabled: false
45+
type: kind
46+
config: #default location of config file or your existing config file to copy
47+
clusterName: demo-win-kind #name of the cluster (this need to be the same as in a config file)
48+
clusterDeployment: local
49+
clusterStart: "kind create cluster"
50+
spec:
51+
# If the OS is not needed may be removed so the three below are mutually exclusive, if not needed set them to null or remove it
52+
wsl: "https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64"
53+
mac: "https://kind.sigs.k8s.io/dl/v0.9.0/kind-darwin-amd64"
54+
linux: "https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64"
55+
windows: "https://kind.sigs.k8s.io/dl/v0.9.0/kind-windows-amd64"
56+
# Everything from this repo will be ran in this cluster. You trust me right?
57+
plugins:
58+
- repo:
59+
name:
60+
- repo:
61+
name:
62+
63+
- name: localK3d #name of the cluster instance not the name of the cluster
64+
enabled: true
65+
type: k3d
66+
config: #default location of config file or your existing config file to copy
67+
clusterName: demo-win-k3d #name of the cluster (this need to be the same as in a config file)
68+
clusterDeployment: local
69+
clusterStart: "k3d cluster create"
70+
spec:
71+
# If the OS is not needed may be removed so the three below are mutually exclusive, if not needed set them to null or remove it
72+
wsl: "https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64"
73+
mac: "https://kind.sigs.k8s.io/dl/v0.9.0/kind-darwin-amd64"
74+
linux: "https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64"
75+
windows: "https://github.com/rancher/k3d/releases/download/v3.4.0-test.0/k3d-windows-amd64.exe"
76+
# Everything from this repo will be ran in this cluster. You trust me right?
77+
plugins:
78+
- repo:
79+
name:
80+
- repo:
81+
name:
82+
83+
- name: remoteK3s #name of the cluster instance not the name of the cluster
84+
enabled: false
85+
type: k3s
86+
config: remote #default location of config file or your existing config file to copy if Remote will be copy from remote location
87+
clusterName: demo-cluster-remote #name of the cluster (this need to be the same as in a config file)
88+
clusterDeployment: cloud
89+
clusterStart:
90+
spec:
91+
# If the OS is not needed may be removed so the three below are mutually exclusive, if not needed set them to null or remove it
92+
wsl:
93+
mac:
94+
linux:
95+
windows:
96+
cloudType: civo
97+
cloudNodes: 1
98+
cloudSecretPath: $HOME/.k3ai/secret.txt
99+
# Everything from this repo will be ran in this cluster. You trust me right?
100+
plugins:
101+
- repo: "https://github.com/alfsuse/demo-plugins"
102+
name: "demo"
103+
- repo: "https://github.com/alfsuse/demo-plugins-2"
104+
name: "demo2"

go.mod

+5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ go 1.15
55
require (
66
cloud.google.com/go v0.69.1 // indirect
77
github.com/Azure/go-autorest/autorest v0.11.10 // indirect
8+
github.com/civo/civogo v0.2.22
9+
github.com/enescakir/emoji v1.0.0
810
github.com/golang/protobuf v1.4.3 // indirect
911
github.com/google/gofuzz v1.2.0 // indirect
1012
github.com/gorilla/mux v1.8.0
13+
github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c
1114
github.com/imdario/mergo v0.3.11 // indirect
1215
github.com/pkg/errors v0.9.1
1316
github.com/spf13/cobra v1.1.1
@@ -18,7 +21,9 @@ require (
1821
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
1922
google.golang.org/appengine v1.6.7 // indirect
2023
gopkg.in/yaml.v2 v2.3.0
24+
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
2125
k8s.io/client-go v0.19.3
2226
k8s.io/kubectl v0.19.3
2327
k8s.io/utils v0.0.0-20201015054608-420da100c033 // indirect
28+
2429
)

go.sum

+21
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,11 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
9090
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
9191
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw=
9292
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
93+
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=
9394
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
9495
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
96+
github.com/civo/civogo v0.2.22 h1:C0fzqP8vIUDRSfQ1es4lIOA+eb0cR0LyKnM3+7pb6YY=
97+
github.com/civo/civogo v0.2.22/go.mod h1:SR0ZOhABfQHjgNQE3UyfX4gaYsrfslkPFRFMx5P29rg=
9598
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
9699
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
97100
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
@@ -114,6 +117,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3
114117
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
115118
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
116119
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
120+
github.com/enescakir/emoji v1.0.0 h1:W+HsNql8swfCQFtioDGDHCHri8nudlK1n5p2rHCJoog=
121+
github.com/enescakir/emoji v1.0.0/go.mod h1:Bt1EKuLnKDTYpLALApstIkAjdDrS/8IAgTkKp+WKFD0=
117122
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
118123
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
119124
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
@@ -249,6 +254,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
249254
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
250255
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
251256
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
257+
github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c h1:aY2hhxLhjEAbfXOx2nRJxCXezC6CO2V/yN+OCr1srtk=
258+
github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=
252259
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
253260
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
254261
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
@@ -264,7 +271,11 @@ github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/
264271
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
265272
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
266273
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
274+
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU=
275+
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU=
267276
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
277+
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
278+
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
268279
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
269280
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
270281
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
@@ -278,15 +289,22 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
278289
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
279290
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
280291
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
292+
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw=
293+
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
281294
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
282295
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
283296
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
284297
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
285298
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
286299
github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM=
287300
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
301+
github.com/manifoldco/promptui v0.8.0 h1:R95mMF+McvXZQ7j1g8ucVZE1gLP3Sv6j9vlF9kyRqQo=
302+
github.com/manifoldco/promptui v0.8.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ=
303+
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
288304
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
289305
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
306+
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
307+
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
290308
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
291309
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
292310
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
@@ -499,6 +517,7 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h
499517
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
500518
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
501519
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
520+
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
502521
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
503522
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
504523
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -699,6 +718,8 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
699718
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
700719
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
701720
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
721+
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
722+
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
702723
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
703724
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
704725
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

internal/infra/cloud/aws.go

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package cloud
2+
3+
import (
4+
"fmt"
5+
6+
//Cloud providers GO packages
7+
8+
"github.com/enescakir/emoji"
9+
)
10+
11+
// const (
12+
// apiKey = "7TEH9KPSunoBRxYwyUAMGrf1vpCaVtmF03IQ2068cDXk4sbOgi"
13+
// )
14+
15+
//AwsCloudInit run specific client configurations based on cloud providers selection
16+
func AwsCloudInit(osFlavor string, cloudProvider string) {
17+
fmt.Printf("%v Ouch sorry we still working on this but hey if it is important for you why not open an issue?\n", emoji.ConstructionWorker)
18+
fmt.Printf("%v https://github.com/kf5i/k3ai-core/issues/new/choose", emoji.RightArrow)
19+
}

internal/infra/cloud/azure.go

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package cloud
2+
3+
import (
4+
"fmt"
5+
6+
//Cloud providers GO packages
7+
8+
"github.com/enescakir/emoji"
9+
)
10+
11+
// const (
12+
// apiKey = "7TEH9KPSunoBRxYwyUAMGrf1vpCaVtmF03IQ2068cDXk4sbOgi"
13+
// )
14+
15+
//AzureCloudInit run specific client configurations based on cloud providers selection
16+
func AzureCloudInit(osFlavor string, cloudProvider string) {
17+
fmt.Printf("%v Ouch sorry we still working on this but hey if it is important for you why not open an issue?\n", emoji.ConstructionWorker)
18+
fmt.Printf("%v https://github.com/kf5i/k3ai-core/issues/new/choose", emoji.RightArrow)
19+
}

0 commit comments

Comments
 (0)