You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2018/09/17 13:52:26 UTC
[camel-k] branch master updated (698df0d -> a41ac0b)
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git.
from 698df0d Merge pull request #81 from lburgazzoli/cobra-cmd
new 38057de Added make install-minishift command to build
new a41ac0b Added the possibility to specify a namespace
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
README.md | 13 +++++--------
build/Makefile | 5 ++++-
build/install_minishift.sh | 22 ++++++++++++++++++++++
build/minishift_add_role.sh | 7 -------
4 files changed, 31 insertions(+), 16 deletions(-)
create mode 100755 build/install_minishift.sh
delete mode 100755 build/minishift_add_role.sh
[camel-k] 02/02: Added the possibility to specify a namespace
Posted by lb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit a41ac0bda7ed3fdf6a69da68e0e0048f3af8b643
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 17 15:50:54 2018 +0200
Added the possibility to specify a namespace
---
README.md | 3 ++-
build/install_minishift.sh | 15 +++++++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 528e2ff..d86638a 100644
--- a/README.md
+++ b/README.md
@@ -178,7 +178,8 @@ make test-integration
### Running
If you want to install everything you have in your source code and see it running on Kubernetes, you need to run the following command:
-- `make install-minishift`: to build the project and run it on Minishift
+- `make install-minishift`: to build the project and run it on Minishift, the default namespace for this is `myproject`
+- you can specify a different namespace with `make install-minishift project=myawesomeproject`
This command assumes you have an already running Minishift instance.
diff --git a/build/install_minishift.sh b/build/install_minishift.sh
index 5414771..00c0104 100755
--- a/build/install_minishift.sh
+++ b/build/install_minishift.sh
@@ -1,11 +1,22 @@
#!/bin/sh
-oc login -u system:admin
+if [ "$project" = "" ]; then
+ project="myproject"
+fi
+echo $project
+if [ "$project" != "myproject" ]; then
+ oc new-project $project
+ oc project $project
+fi
+oc login -u system:admin
make
eval $(minishift docker-env)
make images
./kamel install --cluster-setup
oc delete pod -l name=camel-k-operator
-oc login -u developer
+oc login -u developer
+if [ "$project" != "myproject" ]; then
+ oc project $project
+fi
./kamel install
[camel-k] 01/02: Added make install-minishift command to build
Posted by lb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 38057de39449d37d0b4ae0bf108bcd4383fc868f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 17 12:25:26 2018 +0200
Added make install-minishift command to build
---
README.md | 12 ++++--------
build/Makefile | 5 ++++-
build/install_minishift.sh | 11 +++++++++++
build/minishift_add_role.sh | 7 -------
4 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md
index 77ec083..528e2ff 100644
--- a/README.md
+++ b/README.md
@@ -177,14 +177,10 @@ make test-integration
### Running
-If you want to install everything you have in your source code and see it running on Kubernetes, you need to follow these steps:
-- `make`: to build the project.
-- `eval $(minishift docker-env)`: to connect to your Minishift Docker daemon.
-- `make images`: to build the operator docker image.
-- `./kamel install`: to install Camel K into the namespace.
-- `oc delete pod -l name=camel-k-operator`: to ensure the operator is using latest image (delete the pod to let Openshift recreate it).
-
-**Note for contributors:** why don't you embed all those steps in a `make install-minishift` command?
+If you want to install everything you have in your source code and see it running on Kubernetes, you need to run the following command:
+- `make install-minishift`: to build the project and run it on Minishift
+
+This command assumes you have an already running Minishift instance.
Now you can play with Camel K:
diff --git a/build/Makefile b/build/Makefile
index 57cb693..172ccd5 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -52,6 +52,9 @@ images-build:
images-push:
./build/images_push.sh
+install-minishift:
+ ./build/install_minishift.sh
+
test: check
check:
go test ./...
@@ -62,4 +65,4 @@ check-integration:
-.PHONY: build build-operator build-kamel build-embed-resources build-runtime dep codegen images images-build images-push test check test-integration check-integration clean release prepare-release cross-compile new-version git-tag increment-snapshot
+.PHONY: build build-operator build-kamel build-embed-resources build-runtime dep codegen images images-build images-push test check test-integration check-integration clean release prepare-release cross-compile new-version git-tag increment-snapshot install-minishift
diff --git a/build/install_minishift.sh b/build/install_minishift.sh
new file mode 100755
index 0000000..5414771
--- /dev/null
+++ b/build/install_minishift.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+oc login -u system:admin
+make
+eval $(minishift docker-env)
+make images
+./kamel install --cluster-setup
+oc delete pod -l name=camel-k-operator
+oc login -u developer
+./kamel install
+
diff --git a/build/minishift_add_role.sh b/build/minishift_add_role.sh
deleted file mode 100755
index 4d69ca4..0000000
--- a/build/minishift_add_role.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-user=$(oc whoami)
-
-oc login -u system:admin
-oc policy add-role-to-user --role-namespace=$(oc project -q) camel-k $user
-oc login -u $user