2017-05-09 03:29:25 +03:00
![Draft Logo ](./docs/img/draft-logo.png )
2017-04-21 18:19:58 +03:00
# Draft: Streamlined Kubernetes Development
2016-11-18 01:18:34 +03:00
2017-05-09 01:11:33 +03:00
[![Build Status ](https://ci.deis.io/buildStatus/icon?job=Azure/draft/master )](https://ci.deis.io/job/Azure/job/draft/job/master/)
2017-02-28 03:46:30 +03:00
2017-04-21 18:19:58 +03:00
_NOTE: Draft is experimental and does not have a stable release yet._
2016-11-18 01:18:34 +03:00
2017-04-21 18:19:58 +03:00
Draft handles the heavy lifting involved in taking source code and deploying it to Kubernetes:
2016-11-18 01:18:34 +03:00
2017-02-16 01:16:39 +03:00
- Builds a container image from application source code
- Pushes the image to a registry
- Packages a [Helm][] chart from application source code
- Installs the chart to Kubernetes, deploying the application
2017-01-19 21:13:24 +03:00
2017-02-10 01:27:59 +03:00
## Usage
2016-11-18 01:18:34 +03:00
2017-05-30 21:23:59 +03:00
### Dependencies
2017-05-10 01:31:47 +03:00
2017-05-30 21:34:04 +03:00
- Draft will need a running Kubernetes cluster to deploy your app. [Minikube ](https://github.com/kubernetes/minikube ) is a great free option.
2017-05-30 21:35:54 +03:00
- Draft expects [Helm ](https://github.com/kubernetes/helm ) to be installed on your Kubernetes cluster. Download [`helm` v2.4.x ](https://github.com/kubernetes/helm/releases ) and
2017-05-30 21:23:59 +03:00
do a `helm init` first, as described in [Installing Helm][].
2017-05-30 21:35:54 +03:00
- Draft needs to push images to a Docker registry, so you'll need to configure Draft with your Docker registry credentials. If don't already have one, you can create a Docker registry for free on either [Dockerhub.com ](https://dockerhub.com ) or [Quay.io ](https://quay.io ).
2017-05-10 01:31:47 +03:00
2017-04-21 18:19:58 +03:00
### Install Draft
2017-02-16 01:16:39 +03:00
2017-04-21 18:19:58 +03:00
Because Draft is currently experimental, there is no stable release out yet and users are expected
to be using the latest build of Draft for testing. Canary releases of the Draft client can be found
2017-03-14 20:17:37 +03:00
at the following links:
2017-04-27 19:30:35 +03:00
- [Linux amd64 ](https://azuredraft.blob.core.windows.net/draft/draft-canary-linux-amd64.tar.gz )
- [macOS amd64 ](https://azuredraft.blob.core.windows.net/draft/draft-canary-darwin-amd64.tar.gz )
- [Windows amd64 ](https://azuredraft.blob.core.windows.net/draft/draft-canary-windows-amd64.tar.gz )
2017-03-14 20:17:37 +03:00
2017-04-21 18:19:58 +03:00
Unpack the Draft binary and add it to your PATH and you are good to go!
2017-03-14 20:17:37 +03:00
2017-05-30 21:23:59 +03:00
### Configure Draft
2017-04-21 18:19:58 +03:00
To install the server-side of Draft, use `draft init` with your credentials to let Draft communicate
2017-05-30 21:23:59 +03:00
with a Docker registry by using the following command:
2017-03-14 20:17:37 +03:00
```
2017-04-21 18:19:58 +03:00
$ draft init --set registry.url=docker.io,registry.org=changeme,registry.authtoken=changeme
2017-03-14 20:17:37 +03:00
```
2017-05-30 21:23:59 +03:00
The auth token field follows the format of Docker's X-Registry-Auth header.
For credential-based logins such as Docker Hub and Quay, use:
2017-03-14 20:17:37 +03:00
```
$ echo '{"username":"jdoe","password":"secret","email":"jdoe@acme.com"}' | base64
```
2017-05-30 21:23:59 +03:00
For token-based logins such as Google Container Registry and Amazon ECR, use:
2017-03-14 20:17:37 +03:00
```
$ echo '{"registrytoken":"9cbaf023786cd7"}' | base64
```
2017-05-30 21:23:59 +03:00
### Take Draft for a Spin
2016-11-18 01:18:34 +03:00
2017-02-22 20:25:05 +03:00
Climb aboard and explore the [Getting Started Guide][Getting Started] - you'll soon be sailing!
2017-02-14 01:51:29 +03:00
2017-05-08 18:22:05 +03:00
## Contributing
2017-05-30 21:23:59 +03:00
If you're looking to build from source or get started hacking on Draft, please see the
[hacking guide][hacking] for more information.
2017-05-08 18:22:05 +03:00
This project has adopted the [Microsoft Open Source Code of Conduct ](https://opensource.microsoft.com/codeofconduct/ ). For more information see the [Code of Conduct FAQ ](https://opensource.microsoft.com/codeofconduct/faq/ ) or contact [opencode@microsoft.com ](mailto:opencode@microsoft.com ) with any additional questions or comments.
## License
2017-02-27 22:32:00 +03:00
2017-04-22 04:22:55 +03:00
This software is covered under the MIT license. You can read the license [here][license].
2017-02-27 22:32:00 +03:00
2017-05-08 20:25:50 +03:00
This software contains code from Heroku Buildpacks, which are also covered by the MIT license.
2017-05-01 18:48:58 +03:00
2017-04-22 04:22:55 +03:00
This software contains code from [Helm][], which is covered by the Apache v2.0 license.
2017-02-27 22:32:00 +03:00
2017-05-08 20:25:50 +03:00
You can read third-party software licenses [here][Third-Party Licenses].
2017-02-27 22:32:00 +03:00
2017-02-14 01:51:29 +03:00
[Getting Started]: docs/getting-started.md
2017-03-11 03:27:47 +03:00
[hacking]: docs/contributing/hacking.md
2017-05-30 21:23:59 +03:00
[`helm` v2.4.2]: https://github.com/kubernetes/helm/releases/tag/v2.4.2
2017-02-08 21:46:10 +03:00
[Helm]: https://github.com/kubernetes/helm
2017-05-10 01:31:47 +03:00
[Installing Helm]: https://github.com/kubernetes/helm/blob/master/docs/install.md
2017-02-27 22:32:00 +03:00
[Kubernetes]: https://kubernetes.io/
[license]: LICENSE
2017-05-08 20:25:50 +03:00
[Third-Party Licenses]: NOTICE