From 87a7fa6e26bdf0a5ac9ac0f045d5bffc0bd88870 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Fri, 11 Nov 2016 14:15:59 -0800 Subject: [PATCH] Use glide for dependency mgmt; update README And compilation instructions to README. --- README.md | 63 ++++++++++++++++-- glide.lock | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++ glide.yaml | 31 +++++++++ 3 files changed, 274 insertions(+), 7 deletions(-) create mode 100644 glide.lock create mode 100644 glide.yaml diff --git a/README.md b/README.md index 1e40b977..ade530dd 100644 --- a/README.md +++ b/README.md @@ -13,44 +13,52 @@ See https://fission.io for more. Running Fission =============== -On your own Kubernetes cluster ------------------------------- - ### Setup Kubernetes On your laptop: +``` https://github.com/kubernetes/minikube +``` + +Or use Google Container Engine to get a cluster. -Or use Google Container Engine. ### Verify access to the cluster +``` $ kubectl version +``` ### Get and Run Fission If you're using GKE, use the fission.yaml unmodified. If you're using minikube, change all instances of LoadBalancer services to NodePort. - +``` $ curl http://fission.io/fission.yaml | kubectl create -f - $ kubectl --namespace fission get services +``` Save the external IP addresses of controller and router services in -FISSION_URL and FISSION_ROUTER, respectively. +FISSION_URL and FISSION_ROUTER, respectively. FISSION_URL is used by +the fission CLI to find the server. (FISSION_ROUTER is only needed +for the examples below to work.) ### Install the client CLI +``` $ curl http://fission.io/fission > fission $ chmod +x fission $ sudo mv fission /usr/local/bin/ +``` ### Run an example +``` $ fission env create --name nodejs --image fission/node-env $ echo 'module.exports = function(context, callback) { callback(200, "Hello, world!\n"); }' > hello.js @@ -61,12 +69,53 @@ FISSION_URL and FISSION_ROUTER, respectively. $ curl http://$FISSION_ROUTER/hello Hello, world! +``` +Compiling Fission +================= + +You'll need go installed, along with the glide dependecy management +tool. You'll also need docker for building images. + +The server side is compiled as one binary ("fission-bundle") which +contains controller, poolmgr and router; it invokes the right one +based on command-line arguments. + +To build fission-bundle: clone this repo, then from the top level +directory: + +``` + # Get dependencies + $ glide install + + # Build fission server and an image + $ pushd fission-bundle + $ ./build.sh + + # Edit push.sh to point to your registry + $ $EDITOR push.sh + $ ./push.sh + $ popd + + # To install, update fission.yaml to point to your compiled image + $ $EDITOR fission.yaml + $ kubectl create -f fission.yaml +``` + +If you're changing the CLI: + +``` + # Build Fission CLI + $ cd fission-cli && go install +``` Status ====== -Fission is in early alpha. Watch this space for announcements soon! +Fission is in early alpha. Don't use it in production just yet, but +play with it and give us feedback! + + Performance diff --git a/glide.lock b/glide.lock new file mode 100644 index 00000000..0e7258f7 --- /dev/null +++ b/glide.lock @@ -0,0 +1,187 @@ +hash: 753577a78b00b1bd2e673763a80976d0146b17254318bd2904f92a0933b51c2b +updated: 2016-11-10T22:37:17.498163866-08:00 +imports: +- name: github.com/blang/semver + version: 60ec3488bfea7cca02b021d106d9911120d25fe9 +- name: github.com/coreos/etcd + version: 952eb4fadeef3f840bd7557544338c985d4ed0ef + subpackages: + - client + - pkg/pathutil + - pkg/types +- name: github.com/davecgh/go-spew + version: 346938d642f2ec3594ed81d874461961cd0faa76 + subpackages: + - spew +- name: github.com/dchest/uniuri + version: 8902c56451e9b58ff940bbe5fec35d5f9c04584a +- name: github.com/docker/distribution + version: 6e62b398420f8c0444e34e8a69a350c139f65956 + subpackages: + - digest + - reference +- name: github.com/docopt/docopt-go + version: 784ddc588536785e7299f7272f39101f7faccc3f +- name: github.com/emicklei/go-restful + version: 3d66f886316ac990eb502aaa89ea38546420b8b7 + subpackages: + - log + - swagger +- name: github.com/ghodss/yaml + version: 73d445a93680fa1a78ae23a5839bad48f32ba1ee +- name: github.com/gogo/protobuf + version: 8d70fb3182befc465c4a1eac8ad4d38ff49778e2 + subpackages: + - proto + - sortkeys +- name: github.com/golang/glog + version: 23def4e6c14b4da8ac2ed8007337bc5eb5007998 +- name: github.com/google/gofuzz + version: fd52762d25a41827db7ef64c43756fd4b9f7e382 +- name: github.com/gorilla/context + version: 08b5f424b9271eedf6f9f0ce86cb9396ed337a42 +- name: github.com/gorilla/handlers + version: ee54c7b44cab12289237fb8631314790076e728b +- name: github.com/gorilla/mux + version: 0eeaf8392f5b04950925b8a69fe70f110fa7cbfc +- name: github.com/juju/ratelimit + version: 77ed1c8a01217656d2080ad51981f6e99adaa177 +- name: github.com/pborman/uuid + version: 3d4f2ba23642d3cfd06bd4b54cf03d99d95c0f1b +- name: github.com/satori/go.uuid + version: 879c5887cd475cd7864858769793b2ceb0d44feb +- name: github.com/Sirupsen/logrus + version: d26492970760ca5d33129d2d799e34be5c4782eb +- name: github.com/spf13/pflag + version: 08b1a584251b5b62f458943640fc8ebd4d50aaa5 +- name: github.com/ugorji/go + version: f1f1a805ed361a0e078bb537e4ea78cd37dcf065 + subpackages: + - codec +- name: github.com/urfave/cli + version: a14d7d367bc02b1f57d88de97926727f2d936387 +- name: golang.org/x/net + version: 6acef71eb69611914f7a30939ea9f6e194c78172 + subpackages: + - context + - http2 + - http2/hpack +- name: golang.org/x/sys + version: b699b7032584f0953262cb2788a0ca19bb494703 + subpackages: + - unix +- name: gopkg.in/inf.v0 + version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 +- name: gopkg.in/yaml.v2 + version: 53feefa2559fb8dfa8d81baad31be332c97d6c77 +- name: k8s.io/client-go + version: 3a5b96cfd3d3ff1d53d979b4297c4f3b869aab09 + subpackages: + - 1.4/discovery + - 1.4/kubernetes + - 1.4/kubernetes/typed/apps/v1alpha1 + - 1.4/kubernetes/typed/authentication/v1beta1 + - 1.4/kubernetes/typed/authorization/v1beta1 + - 1.4/kubernetes/typed/autoscaling/v1 + - 1.4/kubernetes/typed/batch/v1 + - 1.4/kubernetes/typed/certificates/v1alpha1 + - 1.4/kubernetes/typed/core/v1 + - 1.4/kubernetes/typed/extensions/v1beta1 + - 1.4/kubernetes/typed/policy/v1alpha1 + - 1.4/kubernetes/typed/rbac/v1alpha1 + - 1.4/kubernetes/typed/storage/v1beta1 + - 1.4/pkg/api + - 1.4/pkg/api/endpoints + - 1.4/pkg/api/errors + - 1.4/pkg/api/install + - 1.4/pkg/api/meta + - 1.4/pkg/api/meta/metatypes + - 1.4/pkg/api/pod + - 1.4/pkg/api/resource + - 1.4/pkg/api/service + - 1.4/pkg/api/unversioned + - 1.4/pkg/api/unversioned/validation + - 1.4/pkg/api/util + - 1.4/pkg/api/v1 + - 1.4/pkg/api/validation + - 1.4/pkg/apimachinery + - 1.4/pkg/apimachinery/registered + - 1.4/pkg/apis/apps + - 1.4/pkg/apis/apps/install + - 1.4/pkg/apis/apps/v1alpha1 + - 1.4/pkg/apis/authentication + - 1.4/pkg/apis/authentication/install + - 1.4/pkg/apis/authentication/v1beta1 + - 1.4/pkg/apis/authorization + - 1.4/pkg/apis/authorization/install + - 1.4/pkg/apis/authorization/v1beta1 + - 1.4/pkg/apis/autoscaling + - 1.4/pkg/apis/autoscaling/install + - 1.4/pkg/apis/autoscaling/v1 + - 1.4/pkg/apis/batch + - 1.4/pkg/apis/batch/install + - 1.4/pkg/apis/batch/v1 + - 1.4/pkg/apis/batch/v2alpha1 + - 1.4/pkg/apis/certificates + - 1.4/pkg/apis/certificates/install + - 1.4/pkg/apis/certificates/v1alpha1 + - 1.4/pkg/apis/extensions + - 1.4/pkg/apis/extensions/install + - 1.4/pkg/apis/extensions/v1beta1 + - 1.4/pkg/apis/policy + - 1.4/pkg/apis/policy/install + - 1.4/pkg/apis/policy/v1alpha1 + - 1.4/pkg/apis/rbac + - 1.4/pkg/apis/rbac/install + - 1.4/pkg/apis/rbac/v1alpha1 + - 1.4/pkg/apis/storage + - 1.4/pkg/apis/storage/install + - 1.4/pkg/apis/storage/v1beta1 + - 1.4/pkg/auth/user + - 1.4/pkg/capabilities + - 1.4/pkg/conversion + - 1.4/pkg/conversion/queryparams + - 1.4/pkg/fields + - 1.4/pkg/labels + - 1.4/pkg/runtime + - 1.4/pkg/runtime/serializer + - 1.4/pkg/runtime/serializer/json + - 1.4/pkg/runtime/serializer/protobuf + - 1.4/pkg/runtime/serializer/recognizer + - 1.4/pkg/runtime/serializer/streaming + - 1.4/pkg/runtime/serializer/versioning + - 1.4/pkg/security/apparmor + - 1.4/pkg/selection + - 1.4/pkg/third_party/forked/golang/reflect + - 1.4/pkg/types + - 1.4/pkg/util + - 1.4/pkg/util/clock + - 1.4/pkg/util/config + - 1.4/pkg/util/crypto + - 1.4/pkg/util/errors + - 1.4/pkg/util/flowcontrol + - 1.4/pkg/util/framer + - 1.4/pkg/util/hash + - 1.4/pkg/util/integer + - 1.4/pkg/util/intstr + - 1.4/pkg/util/json + - 1.4/pkg/util/labels + - 1.4/pkg/util/net + - 1.4/pkg/util/net/sets + - 1.4/pkg/util/parsers + - 1.4/pkg/util/rand + - 1.4/pkg/util/runtime + - 1.4/pkg/util/sets + - 1.4/pkg/util/uuid + - 1.4/pkg/util/validation + - 1.4/pkg/util/validation/field + - 1.4/pkg/util/wait + - 1.4/pkg/util/yaml + - 1.4/pkg/version + - 1.4/pkg/watch + - 1.4/pkg/watch/versioned + - 1.4/rest + - 1.4/tools/clientcmd/api + - 1.4/tools/metrics + - 1.4/transport +testImports: [] diff --git a/glide.yaml b/glide.yaml new file mode 100644 index 00000000..9f664167 --- /dev/null +++ b/glide.yaml @@ -0,0 +1,31 @@ +package: github.com/platform9/fission +import: +- package: github.com/Sirupsen/logrus + version: ^0.11.0 +- package: github.com/coreos/etcd + subpackages: + - client +- package: github.com/dchest/uniuri +- package: github.com/docopt/docopt-go + version: ^0.6.2 +- package: github.com/gorilla/handlers + version: ^1.1.0 +- package: github.com/gorilla/mux + version: ^1.1.0 +- package: github.com/satori/go.uuid + version: ^1.1.0 +- package: github.com/urfave/cli + version: ^1.18.1 +- package: golang.org/x/net + subpackages: + - context +- package: k8s.io/client-go + version: 1.4 + subpackages: + - 1.4/kubernetes + - 1.4/pkg/api + - 1.4/pkg/api/v1 + - 1.4/pkg/apis/extensions/v1beta1 + - 1.4/pkg/labels + - 1.4/pkg/util/intstr + - 1.4/rest