Files
fission-src/Compiling.md
T
Erwin van EykandSoam Vasani 70a93a7302 Add Container object to environment build and runtime specs (#413)
Environment Specs so far had only an image URL to specify a container image.

This was fine for public images but fell short in a few of cases:
(a) Using private image registries
(b) Specifying environment variables (this is needed for workflows helm install)
(c) Setting a SecurityContext for the container

This change adds the Container object to both build and runtime Environments. 

Compatibility is preserved -- the existing ImageURL field is still used.  See the comments in types.go for the overriding rules in the case that both Container and ImageURL are specified.
2018-03-22 00:13:02 -07:00

1.5 KiB

Compiling Fission

[You only need to do this if you're making Fission changes; if you're just deploying Fission, use fission.yaml which points to prebuilt images.]

You'll need the go compiler and tools installed, along with the glide dependency 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 to $GOPATH/src/github.com/fission/fission, then from the top level directory (if you want to build the image with the docker inside minikube, you'll need to set the proper environment variables with eval $(minikube docker-env)):

  # Get dependencies
  $ glide install -v

  # Build fission server and an image
  $ pushd fission-bundle
  $ ./build.sh

You now need to build the docker image for fission. You can use push.sh and push it to a docker hub account. But it's easiest to use minikube and its built-in docker daemon:

  $ eval $(minikube docker-env)
  $ docker build -t minikube/fission-bundle .

Next, install fission with this image on your kubernetes cluster using the helm chart:

  $ helm install --set "image=minikube/fission-bundle,imageTag=latest,pullPolicy=IfNotPresent,analytics=false" charts/fission-all

And if you're changing the CLI too, you can build it with:

  # Build Fission CLI
  $ cd fission && go install