From 3aa0c2e80313f53012a8a1414df00ec883c488d1 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Wed, 30 Nov 2016 13:48:42 -0800 Subject: [PATCH 1/6] Streamline setup instructions a bit --- README.md | 61 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 619c93c0..58dde620 100644 --- a/README.md +++ b/README.md @@ -88,41 +88,26 @@ Or, you can use Google Container Engine's free trial to get a 3 node cluster. $ kubectl version ``` -### Get and Run Fission +### Get and Run Fission: Minikube or Local cluster -Deploy the fission services and deployments. +If you're using minikube or no cloud provider, use these commands to +set up services with NodePort. This exposes fission on ports 31313 +and 31314. ``` $ kubectl create -f http://fission.io/fission.yaml -``` - -#### local and no cloud provider - -If you're using minikube or no cloud provider use the services with NodePort. - -``` $ kubectl create -f http://fission.io/fission-nodeport.yaml ``` -#### Cloud - -If you're using GKE or any other cloud provider, use the services with a LoadBalancer. - -``` - $ kubectl create -f http://fission.io/fission-cloud.yaml -``` - -### Set fission URLs - ``` $ kubectl --namespace fission get services ``` Save the external IP addresses of controller and router services in -FISSION_URL and FISSION_ROUTER, respectively. FISSION_URL should be prefixed with a `http://`. FISSION_URL is used by -the fission CLI to find the server. (FISSION_ROUTER is only needed -for the examples below to work.) Below is an example -for Minikube with NodePort. +FISSION_URL and FISSION_ROUTER, respectively. FISSION_URL should be +prefixed with a `http://`. FISSION_URL is used by the fission CLI to +find the server. (FISSION_ROUTER is only needed for the examples +below to work.) Below is an example for Minikube with NodePort. ``` $ export FISSION_ROUTER=$(minikube ip):31314 @@ -130,6 +115,36 @@ for Minikube with NodePort. $ export FISSION_URL=http://$(minikube ip):31313 ``` + +### Get and Run Fission: GKE or other Cloud + +If you're using GKE or any other cloud provider that supports the +LoadBalancer service type, use these commands: + +``` + $ kubectl create -f http://fission.io/fission.yaml + $ kubectl create -f http://fission.io/fission-cloud.yaml +``` + +Wait for services to get IP addresses (check this with ```kubectl +--namespace fission get svc```). Then: + +``` + $ export FISSION_URL=http://$(kubectl --namespace fission get svc controller -o=jsonpath='{..ip}') + $ export FISSION_ROUTER=$(kubectl --namespace fission get svc router -o=jsonpath='{..ip}') +``` + + +### Set fission URLs + + +Save the external IP addresses of controller and router services in +FISSION_URL and FISSION_ROUTER, respectively. FISSION_URL should be +prefixed with a `http://`. FISSION_URL is used by the fission CLI to +find the server. (FISSION_ROUTER is only needed for the examples +below to work.) Below is an example for Minikube with NodePort. + + ### Install the client CLI ``` From 460db87bd79f5845d8249c5eed68fc7841b7585a Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Wed, 30 Nov 2016 14:13:00 -0800 Subject: [PATCH 2/6] Merge env var section to setup --- README.md | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 58dde620..8b8811f3 100644 --- a/README.md +++ b/README.md @@ -99,15 +99,11 @@ and 31314. $ kubectl create -f http://fission.io/fission-nodeport.yaml ``` -``` - $ kubectl --namespace fission get services -``` - -Save the external IP addresses of controller and router services in -FISSION_URL and FISSION_ROUTER, respectively. FISSION_URL should be -prefixed with a `http://`. FISSION_URL is used by the fission CLI to -find the server. (FISSION_ROUTER is only needed for the examples -below to work.) Below is an example for Minikube with NodePort. +Set FISSION_URL and FISSION_ROUTER environment variables FISSION_URL +should be prefixed with a `http://`. FISSION_URL is used by the +fission CLI to find the server. (FISSION_ROUTER is only needed for +the examples below to work.) Below is an example for Minikube with +NodePort. ``` $ export FISSION_ROUTER=$(minikube ip):31314 @@ -126,25 +122,16 @@ LoadBalancer service type, use these commands: $ kubectl create -f http://fission.io/fission-cloud.yaml ``` -Wait for services to get IP addresses (check this with ```kubectl ---namespace fission get svc```). Then: +Save the external IP addresses of controller and router services in +FISSION_URL and FISSION_ROUTER, respectively. Wait for services to +get IP addresses (check this with ```kubectl --namespace fission get +svc```). Then: ``` $ export FISSION_URL=http://$(kubectl --namespace fission get svc controller -o=jsonpath='{..ip}') $ export FISSION_ROUTER=$(kubectl --namespace fission get svc router -o=jsonpath='{..ip}') ``` - -### Set fission URLs - - -Save the external IP addresses of controller and router services in -FISSION_URL and FISSION_ROUTER, respectively. FISSION_URL should be -prefixed with a `http://`. FISSION_URL is used by the fission CLI to -find the server. (FISSION_ROUTER is only needed for the examples -below to work.) Below is an example for Minikube with NodePort. - - ### Install the client CLI ``` From 654763cac1edbe9f3bfd99ab4578622d5282e5b2 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Wed, 30 Nov 2016 14:30:00 -0800 Subject: [PATCH 3/6] Mac/linux CLI --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b8811f3..53121fe2 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,10 @@ svc```). Then: ### Install the client CLI ``` - $ curl http://fission.io/fission > fission + # Choose the right command, for Mac or Linux: + $ curl http://fission.io/mac/fission > fission + OR + $ curl http://fission.io/linux/fission > fission $ chmod +x fission @@ -144,6 +147,8 @@ svc```). Then: ### Run an example +Finally, you're ready to use Fission! + ``` $ fission env create --name nodejs --image fission/node-env From a37b71e0634695645bc5255eb062e865b576efe3 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Wed, 30 Nov 2016 15:45:48 -0800 Subject: [PATCH 4/6] link to gke; other readme edits --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 53121fe2..c263302c 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Running Fission on your Cluster You can install Kubernetes on your laptop with minikube: https://github.com/kubernetes/minikube -Or, you can use Google Container Engine's free trial to get a 3 node cluster. +Or, you can use [Google Container Engine's](https://cloud.google.com/container-engine/) free trial to get a 3 node cluster. ### Verify access to the cluster @@ -99,11 +99,13 @@ and 31314. $ kubectl create -f http://fission.io/fission-nodeport.yaml ``` -Set FISSION_URL and FISSION_ROUTER environment variables FISSION_URL -should be prefixed with a `http://`. FISSION_URL is used by the -fission CLI to find the server. (FISSION_ROUTER is only needed for -the examples below to work.) Below is an example for Minikube with -NodePort. +Set the FISSION_URL and FISSION_ROUTER environment variables. +FISSION_URL should be prefixed with a `http://`. + +FISSION_URL is used by the fission CLI to find the server. +(FISSION_ROUTER is only needed for the examples below to work.) + +If you're using minikube, use these commands: ``` $ export FISSION_ROUTER=$(minikube ip):31314 From 87e2daf455a697beedae72b0194aef674d2e1597 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Wed, 30 Nov 2016 15:47:17 -0800 Subject: [PATCH 5/6] minor readme edits --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c263302c..44b9ff3a 100644 --- a/README.md +++ b/README.md @@ -100,17 +100,15 @@ and 31314. ``` Set the FISSION_URL and FISSION_ROUTER environment variables. -FISSION_URL should be prefixed with a `http://`. - FISSION_URL is used by the fission CLI to find the server. -(FISSION_ROUTER is only needed for the examples below to work.) +FISSION_URL should be prefixed with a `http://`. (FISSION_ROUTER is +only needed for the examples below to work.) If you're using minikube, use these commands: ``` - $ export FISSION_ROUTER=$(minikube ip):31314 - $ export FISSION_URL=http://$(minikube ip):31313 + $ export FISSION_ROUTER=$(minikube ip):31314 ``` From 36e056c1f424da8ab9d573d23154e4a597e1e5f5 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Wed, 30 Nov 2016 16:00:41 -0800 Subject: [PATCH 6/6] make cli download into 1 copy-pasteable command --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 44b9ff3a..d6f42a50 100644 --- a/README.md +++ b/README.md @@ -134,15 +134,16 @@ svc```). Then: ### Install the client CLI +Get the CLI binary for Mac: + +``` + $ curl http://fission.io/mac/fission > fission && chmod +x fission && sudo mv fission /usr/local/bin/ ``` - # Choose the right command, for Mac or Linux: - $ curl http://fission.io/mac/fission > fission - OR - $ curl http://fission.io/linux/fission > fission - $ chmod +x fission +Or Linux: - $ sudo mv fission /usr/local/bin/ +``` + $ curl http://fission.io/linux/fission > fission && chmod +x fission && sudo mv fission /usr/local/bin/ ``` ### Run an example