Skip to content

Commit 4d03fea

Browse files
author
Oleg Sucharevich
authored
Support GCP auth plugin
* update dep with GCP auth plugin * add go ldflag when running local build to avoid version check in venonactl * use GCP auth plugin * create the first resource with .*.re.yaml then register namespace as runtime-environment at Codefresh * update readme with GCP instructions
1 parent 46d2a56 commit 4d03fea

File tree

45 files changed

+6395
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+6395
-15
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66

77
### Prerequisite:
88
* [Kubernetes](https://kubernetes.io/docs/tasks/tools/install-kubectl/) - Used to create resource in your K8S cluster
9-
* Kubernetes cluter version > 1.10
9+
* Kube Version > 1.10:
1010
* [Instuction](#Install-on-cluster-version-<-1.10) to install on cluster version < 1.10
11+
* Disk size 50GB per node
1112
* [Codefresh](https://codefresh-io.github.io/cli/) - Used to create resource in Codefresh
13+
* Authenticated context exist under `$HOME/.cfconfig` or authenticate with [Codefesh CLI](https://codefresh-io.github.io/cli/getting-started/#authenticate)
1214

1315

1416
### Install venona
17+
1518
#### Fresh installation
1619
* Download [venona's](https://github.com/codefresh-io/venona/releases) binary
1720
* Create namespace where venona should run<br />
@@ -40,12 +43,21 @@ rules:
4043
- get
4144
```
4245
46+
47+
48+
49+
50+
51+
#### Install on GCP
52+
* Make sure your user has `Kubernetes Engine Cluster Admin` role in google console
53+
* Bind your user with cluster-admin kubernetes clusterrole `kubectl create clusterrolebinding NAME --clusterrole cluster-admin --user YOUR_USER`
54+
4355
#### Upgrade
4456
To upgrade existing runtime-environment, a one that was created without Venona's agent, run:
45-
* Find the name of the environment <br />
46-
Example: `codefresh get re`
57+
* Find the name of the cluster was linked to that runtime environment <br />
58+
Example: `codefresh get cluster`
4759
* Install <br />
48-
Example: `venona install --skip-runtime-installation --runtime-environment RUNTIME-ENVIRONMENT`
60+
Example: `venona install --cluster-name CLUSTER`
4961
* Get the status <br />
5062
Example: `venona status RUNTIME-ENVIRONMENT`
5163
Example: `kubectl get pods -n NAMESPACE`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "venona",
3-
"version": "0.5.3",
3+
"version": "0.6.0",
44
"description": "Codefresh agent to run on Codefresh's runtime environment and execute pipeline",
55
"main": "index.js",
66
"scripts": {

venonactl/Gopkg.lock

Lines changed: 21 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

venonactl/cmd/install.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ func init() {
8989
}
9090

9191
func installRuntimeEnvironment() {
92+
err := runtimectl.GetOperator(runtimectl.RuntimeEnvironmentOperatorType).Install()
93+
internal.DieOnError(err)
94+
9295
cfAPI := codefresh.New()
93-
err := cfAPI.Validate()
96+
err = cfAPI.Validate()
9497
internal.DieOnError(err)
9598

9699
err = cfAPI.Sign()
@@ -99,8 +102,6 @@ func installRuntimeEnvironment() {
99102
err = cfAPI.Register()
100103
internal.DieOnError(err)
101104

102-
err = runtimectl.GetOperator(runtimectl.RuntimeEnvironmentOperatorType).Install()
103-
internal.DieOnError(err)
104105
}
105106

106107
func installvenona() {

venonactl/cmd/root.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ var (
4343
version = "dev"
4444
commit = "none"
4545
date = "unknown"
46+
// set to false by default, when running hack/build.sh will change to true
47+
// to prevent version checking during development
48+
localDevFlow = "false"
4649
)
4750

4851
var rootCmd = &cobra.Command{
@@ -107,7 +110,7 @@ var rootCmd = &cobra.Command{
107110
s.Image = &store.Image{
108111
Name: "codefresh/venona",
109112
}
110-
if skipVerionCheck {
113+
if skipVerionCheck || localDevFlow == "true" {
111114
latestVersion := &store.LatestVersion{
112115
Version: store.DefaultVersion,
113116
IsDefault: true,

venonactl/hack/build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/bash
22
set -e
33
OUTFILE=${GOPATH}/bin/venonactl
4-
54
go generate ${GOPATH}/src/github.com/codefresh-io/venona/venonactl/pkg/operators/types.go
6-
go build -o $OUTFILE main.go
5+
go build -ldflags '-X github.com/codefresh-io/venona/venonactl/cmd.localDevFlow=true' -o $OUTFILE main.go
76

87
chmod +x $OUTFILE

venonactl/pkg/operators/helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ import (
3131
"k8s.io/apimachinery/pkg/runtime"
3232
"k8s.io/client-go/kubernetes"
3333
"k8s.io/client-go/kubernetes/scheme"
34+
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
3435
"k8s.io/client-go/rest"
3536
"k8s.io/client-go/tools/clientcmd"
3637
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
37-
// "k8s.io/apimachinery/pkg/runtime/schema"
3838
)
3939

4040
// ExecuteTemplate - executes templates in tpl str with config as values

venonactl/vendor/cloud.google.com/go/AUTHORS

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

venonactl/vendor/cloud.google.com/go/CONTRIBUTORS

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)