draft-classic/README.md

90 строки
3.8 KiB
Markdown
Исходник Обычный вид История

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-02-10 01:27:59 +03:00
## Usage
2016-11-18 01:18:34 +03:00
### Dependencies
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.
- 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
do a `helm init` first, as described in [Installing Helm][].
- 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-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:
- [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
### 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
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
```
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
```
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
```
### Take Draft for a Spin
2016-11-18 01:18:34 +03:00
Climb aboard and explore the [Getting Started Guide][Getting Started] - you'll soon be sailing!
2017-05-08 18:22:05 +03:00
## Contributing
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
This software is covered under the MIT license. You can read the license [here][license].
This software contains code from Heroku Buildpacks, which are also covered by the MIT license.
This software contains code from [Helm][], which is covered by the Apache v2.0 license.
You can read third-party software licenses [here][Third-Party Licenses].
[Getting Started]: docs/getting-started.md
[hacking]: docs/contributing/hacking.md
[`helm` v2.4.2]: https://github.com/kubernetes/helm/releases/tag/v2.4.2
[Helm]: https://github.com/kubernetes/helm
[Installing Helm]: https://github.com/kubernetes/helm/blob/master/docs/install.md
[Kubernetes]: https://kubernetes.io/
[license]: LICENSE
[Third-Party Licenses]: NOTICE