Skip to content

Commit 6ff5cb6

Browse files
committed
doc(README.md): add basic documentation
1 parent af2ab12 commit 6ff5cb6

1 file changed

Lines changed: 11 additions & 58 deletions

File tree

README.md

Lines changed: 11 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,14 @@
1-
# Prototype Component Repo
1+
# Deis Builder
22

3-
This repo is a prototype for what a Deis component's Git repository
4-
should look like.
3+
[![Build Status](https://travis-ci.org/deis/minio.svg?branch=master)](https://travis-ci.org/deis/minio)
54

6-
A Deis component is...
5+
This repository holds the Deis Builder. Builder runs a git server to respond to `git push`es from clients. When it receives a push, it takes the following high level steps:
76

8-
- An isolated piece of functionality (e.g. a microservice)
9-
- That can be packaged into a container (via `docker build`)
10-
- And can be run inside of Kubernetes
11-
12-
Typically, Deis components are written in Go.
13-
14-
## Practical Usage
15-
16-
If you want to experiment with creating a new repo using this framework,
17-
try something like this:
18-
19-
```
20-
$ mkdir my_project
21-
$ cd my_project
22-
$ curl -fsSL https://github.com/technosophos/prototype-repo/archive/master.tar.gz | tar -zxv --strip-components 1
23-
```
24-
25-
## First-Class Kubernetes
26-
27-
Every component must define the appropriate Kubernetes files.
28-
Preferably, components should use *Replication Controllers* over pods,
29-
and use *Services* for autodiscovery.
30-
31-
*Labels* should be used for versioning components and also for
32-
identifying components as part of Deis.
33-
34-
*Secrets* should be used for storing small bits of shared information,
35-
and their contents may be set at startup time.
36-
37-
All Kubernetes definitions should be placed in the `manifests/` directory.
38-
39-
The _Makefile_ should have targets that use `kubectl` to load
40-
definitions into Kubernetes.
41-
42-
## Dockerfiles are for Running
43-
44-
Source code should be built either outside of Docker or in a special
45-
Docker build phase.
46-
47-
A separate Dockerfile should be used for building the image. That
48-
Dockerfile should always be placed inside of the `rootfs` directory, and
49-
should manage the final image size appropriately.
50-
51-
(See the Makefile for one possible way of doing a Docker build phase)
52-
53-
## RootFS
54-
55-
All files that are to be packaged into the container should be written
56-
to the `rootfs/` folder.
57-
58-
## Extended Testing
59-
60-
Along with unit tests, Deis values functional and integration testing.
61-
These tests should go in the `_tests` folder.
7+
1. Accepts the code and writes to the local file system
8+
2. Calls `git archive` to produce a tarball (i.e. a `.tar.gz` file) on the local file system
9+
3. Saves the tarball according to the following rules:
10+
- If the `DEIS_MINIO_SERVICE_HOST` and `DEIS_MINIO_SERVICE_PORT` environment variables exist, uses the [`mc`](https://github.com/minio/mc) client to save to the [Minio](https://github.com/minio/minio) server at `http://$DEIS_MINIO_SERVICE_HOST:$DEIS_MINIO_SERVICE_HOST`
11+
- Otherwise, if the `DEIS_OUTSIDE_STORAGE_HOST` and `DEIS_OUTSIDE_STORAGE_PORT` environment variables exist, uses the [`mc`](https://github.com/minio/mc) client to save to S3 server (or server that adheres to the S3 API) at `https://$DEIS_OUTSIDE_STORAGE_HOST:$DEIS_OUTSIDE_STORAGE_PORT` (this functionality is currently waiting for merge at https://github.com/deis/builder/pull/21).
12+
4. Starts a builder pod according to these rules:
13+
- If a `Dockerfile` is present, starts a [`dockerbuilder`](https://github.com/deis/dockerbuilder) pod, configured to download the code to build from the URL computed in the previous step (`dockerbuilder` and Dockerfile builder are not currently supported. See https://github.com/deis/dockerbuilder/pull/1 for prototype `dockerbuilder` code).
14+
- Otherwise, starts a [`slugbuilder`](https://github.com/deis/slugbuilder) pod, configured to download the code to build from the URL computed in the previous step.

0 commit comments

Comments
 (0)