A tool for developers to create cloud-native applications on Kubernetes.
Перейти к файлу
Matt Boersma 78718234f6 Merge pull request #46 from mboersma/license-happy
docs(LICENSE): update to match GitHub and Kubernetes conventions
2017-02-09 12:40:23 -07:00
api add custom CloseHandler 2017-02-09 08:14:18 -08:00
chart Merge pull request #25 from deis/trunc-63 2017-02-08 10:55:27 -08:00
cmd fix prow up inferring app name based on directory name 2017-02-08 11:34:06 -08:00
docs add docs on starter packs 2017-02-08 10:14:21 -08:00
pkg send proper close message to client 2017-02-08 13:44:32 -08:00
tests fix(tests/e2e.sh): strip trailing slash more POSIXly 2017-02-09 11:34:10 -07:00
.dockerignore chore(.dockerignore): ignore files outside rootfs/ 2017-02-08 16:53:08 -07:00
.gitignore use testdata in README example 2017-01-23 11:56:36 -08:00
Dockerfile bump to alpine 3.5 2017-01-30 14:54:03 -08:00
LICENSE docs(LICENSE): update to match GitHub and Kubernetes conventions 2017-02-09 12:35:10 -07:00
Makefile feat(Makefile): compress binary with upx if available 2017-02-09 12:23:02 -07:00
README.md docs(README): update some bootstrapping details 2017-02-08 16:13:41 -07:00
design.md s/new/create 2017-02-07 11:00:45 -08:00
glide.lock rebase on top of helm master 2017-02-08 10:53:11 -08:00
glide.yaml rebase on top of helm master 2017-02-08 10:53:11 -08:00
versioning.mk rename to deis/prow 2017-01-23 11:09:48 -08:00

README.md

Prow: Streamlined Kubernetes Development

NOTE: Prow is experimental and does not have a stable release yet.

Prow is a tool for developers to create cloud-native applications on Kubernetes.

Usage

NOTE: These instructions are temporary until there is an official binary release.

Here's an example of installing Prow and creating an application:

$ go version
go version go1.7 linux/amd64
$ # install prowd
$ helm init
$ export IMAGE_PREFIX=bacongobbler
$ make info
Build tag:       git-abc1234
Registry:        quay.io
Immutable tag:   quay.io/bacongobbler/prowd:git-abc1234
Mutable tag:     quay.io/bacongobbler/prowd:canary
$ make bootstrap docker-build docker-push
$ cat chart/values.yaml | grep 'registry\|name'
  registry: quay.io
  name: deis/prowd
$ helm install ./chart --namespace prow --set image.name=${IMAGE_PREFIX}/prowd
$ make build && export PATH=$PWD/bin:$PATH
$ cd tests/testdata/example-dockerfile-http
$ prow up
--> Building Dockerfile
--> Pushing 127.0.0.1:5000/example-dockerfile-http:fc8c34ba4349ce3771e728b15ead2bb4c81cb9fd
--> Deploying to Kubernetes
    Release "example-dockerfile-http" does not exist. Installing it now.
--> code:DEPLOYED
$ helm list
NAME                      REVISION   UPDATED                     STATUS      CHART
example-dockerfile-http   1          Tue Jan 24 15:04:27 2017    DEPLOYED    example-dockerfile-http-1.0.0
$ kubectl get po
NAME                                       READY     STATUS             RESTARTS   AGE
example-dockerfile-http-3666132817-m2pkr   1/1       Running            0          30s

NOTE: CLI usage will look like this when it is completed.

Start from a source code repository and let Prow create the Kubernetes packaging:

$ cd my-app
$ ls
app.py
$ prow create --pack=python
--> Created ./charts/my-app
--> Created ./charts/my-app/Dockerfile
--> Ready to sail

Now start it up!

$ prow up
--> Building Dockerfile
--> Pushing my-app:latest
--> Deploying to Kubernetes
--> code:DEPLOYED

That's it! You're now running your Python app in a Kubernetes cluster.

Behind the scenes, Prow handles the heavy lifting:

  • Builds a container image from application source code
  • Pushes the image to a registry
  • Creates a Helm chart for the image
  • Installs the chart to Kubernetes, deploying the application

After deploying, you can run prow up again to create new releases when application source code has changed. Or you can let Prow continuously rebuild your application.

Hacking on Prow

The easiest way to hack on Prow is to deploy changes... Using Prow. Check it out!

$ helm list
NAME                    REVISION        UPDATED                         STATUS          CHART
warped-nightingale      1               Wed Feb  8 10:29:19 2017        DEPLOYED        prowd-0.1.0
$ make build docker-binary
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o ./rootfs/bin/prowd -a -installsuffix cgo -tags '' -ldflags ' -X github.com/deis/prow/pkg/version.Version= -X github.com/deis/prow/pkg/version.GitCommit=d46a18200576d6ba3007ed26efb647ffd86303ba -X github.com/deis/prow/pkg/version.GitTreeState=clean' github.com/deis/prow/cmd/prowd
$ ./bin/prow up --app warped-nightingale
--> Building Dockerfile
--> Pushing 127.0.0.1:5000/warped-nightingale:6f3b53003dcbf43821aea43208fc51455674d00e
--> Deploying to Kubernetes
--> code:DEPLOYED

Features

  • Prow is language-agnostic
  • Prow works with any Kubernetes cluster that supports Helm
  • Charts that Prow creates can be edited to suit your needs
  • Charts can be packaged for delivery to your ops team