Skip to content

Commit

Permalink
Merge pull request #635 from cdrage/update-docs
Browse files Browse the repository at this point in the history
Change output examples in docs to new format
  • Loading branch information
kadel authored Jun 12, 2017
2 parents aa84680 + f7e81ab commit dbf15e2
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 84 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Convert [`docker-compose.yaml`](https://raw.githubusercontent.com/kubernetes-inc

```sh
kompose convert -f docker-compose.yaml
INFO file "frontend-service.yaml" created
INFO file "redis-master-service.yaml" created
INFO file "redis-slave-service.yaml" created
INFO file "frontend-deployment.yaml" created
INFO file "redis-master-deployment.yaml" created
INFO file "redis-slave-deployment.yaml" created
INFO Kubernetes file "frontend-service.yaml" created
INFO Kubernetes file "redis-master-service.yaml" created
INFO Kubernetes file "redis-slave-service.yaml" created
INFO Kubernetes file "frontend-deployment.yaml" created
INFO Kubernetes file "redis-master-deployment.yaml" created
INFO Kubernetes file "redis-slave-deployment.yaml" created
```

Other examples are provided in the _examples_ [directory](./examples).
Expand Down
12 changes: 6 additions & 6 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ __2.1. Run `kompose convert` in the same directory__

```bash
▶ kompose convert
INFO file "frontend-service.yaml" created
INFO file "redis-master-service.yaml" created
INFO file "redis-slave-service.yaml" created
INFO file "frontend-deployment.yaml" created
INFO file "redis-master-deployment.yaml" created
INFO file "redis-slave-deployment.yaml" created
INFO Kubernetes file "frontend-service.yaml" created
INFO Kubernetes file "redis-master-service.yaml" created
INFO Kubernetes file "redis-slave-service.yaml" created
INFO Kubernetes file "frontend-deployment.yaml" created
INFO Kubernetes file "redis-master-deployment.yaml" created
INFO Kubernetes file "redis-slave-deployment.yaml" created
```

__2.2. And start it on Kubernetes!__
Expand Down
144 changes: 72 additions & 72 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ $ ls
docker-compose.yml docker-compose-bundle.dab docker-gitlab.yml docker-voting.yml

$ kompose -f docker-gitlab.yml convert
file "redisio-svc.yaml" created
file "gitlab-svc.yaml" created
file "postgresql-svc.yaml" created
file "gitlab-deployment.yaml" created
file "postgresql-deployment.yaml" created
file "redisio-deployment.yaml" created
INFO Kubernetes file "redisio-svc.yaml" created
INFO Kubernetes file "gitlab-svc.yaml" created
INFO Kubernetes file "postgresql-svc.yaml" created
INFO Kubernetes file "gitlab-deployment.yaml" created
INFO Kubernetes file "postgresql-deployment.yaml" created
INFO Kubernetes file "redisio-deployment.yaml" created

$ ls *.yaml
gitlab-deployment.yaml postgresql-deployment.yaml redis-deployment.yaml redisio-svc.yaml web-deployment.yaml
Expand All @@ -46,16 +46,16 @@ You can try with a Docker Compose version 2 like this:
$ kompose --file docker-voting.yml convert
WARN Unsupported key networks - ignoring
WARN Unsupported key build - ignoring
file "worker-svc.yaml" created
file "db-svc.yaml" created
file "redis-svc.yaml" created
file "result-svc.yaml" created
file "vote-svc.yaml" created
file "redis-deployment.yaml" created
file "result-deployment.yaml" created
file "vote-deployment.yaml" created
file "worker-deployment.yaml" created
file "db-deployment.yaml" created
INFO Kubernetes file "worker-svc.yaml" created
INFO Kubernetes file "db-svc.yaml" created
INFO Kubernetes file "redis-svc.yaml" created
INFO Kubernetes file "result-svc.yaml" created
INFO Kubernetes file "vote-svc.yaml" created
INFO Kubernetes file "redis-deployment.yaml" created
INFO Kubernetes file "result-deployment.yaml" created
INFO Kubernetes file "vote-deployment.yaml" created
INFO Kubernetes file "worker-deployment.yaml" created
INFO Kubernetes file "db-deployment.yaml" created

$ ls
db-deployment.yaml docker-compose.yml docker-gitlab.yml redis-deployment.yaml result-deployment.yaml vote-deployment.yaml worker-deployment.yaml
Expand All @@ -66,17 +66,17 @@ You can also provide multiple docker-compose files at the same time:

```console
$ kompose -f docker-compose.yml -f docker-guestbook.yml convert
file "frontend-service.yaml" created
file "mlbparks-service.yaml" created
file "mongodb-service.yaml" created
file "redis-master-service.yaml" created
file "redis-slave-service.yaml" created
file "frontend-deployment.yaml" created
file "mlbparks-deployment.yaml" created
file "mongodb-deployment.yaml" created
file "mongodb-claim0-persistentvolumeclaim.yaml" created
file "redis-master-deployment.yaml" created
file "redis-slave-deployment.yaml" created
INFO Kubernetes file "frontend-service.yaml" created
INFO Kubernetes file "mlbparks-service.yaml" created
INFO Kubernetes file "mongodb-service.yaml" created
INFO Kubernetes file "redis-master-service.yaml" created
INFO Kubernetes file "redis-slave-service.yaml" created
INFO Kubernetes file "frontend-deployment.yaml" created
INFO Kubernetes file "mlbparks-deployment.yaml" created
INFO Kubernetes file "mongodb-deployment.yaml" created
INFO Kubernetes file "mongodb-claim0-persistentvolumeclaim.yaml" created
INFO Kubernetes file "redis-master-deployment.yaml" created
INFO Kubernetes file "redis-slave-deployment.yaml" created

$ ls
mlbparks-deployment.yaml mongodb-service.yaml redis-slave-service.jsonmlbparks-service.yaml
Expand All @@ -92,54 +92,54 @@ Using `--bundle, --dab` to specify a DAB file as below:
```console
$ kompose --bundle docker-compose-bundle.dab convert
WARN: Unsupported key networks - ignoring
file "redis-svc.yaml" created
file "web-svc.yaml" created
file "web-deployment.yaml" created
file "redis-deployment.yaml" created
INFO Kubernetes file "redis-svc.yaml" created
INFO Kubernetes file "web-svc.yaml" created
INFO Kubernetes file "web-deployment.yaml" created
INFO Kubernetes file "redis-deployment.yaml" created
```

### OpenShift

```console
$ kompose --provider openshift --file docker-voting.yml convert
WARN [worker] Service cannot be created because of missing port.
INFO file "vote-service.yaml" created
INFO file "db-service.yaml" created
INFO file "redis-service.yaml" created
INFO file "result-service.yaml" created
INFO file "vote-deploymentconfig.yaml" created
INFO file "vote-imagestream.yaml" created
INFO file "worker-deploymentconfig.yaml" created
INFO file "worker-imagestream.yaml" created
INFO file "db-deploymentconfig.yaml" created
INFO file "db-imagestream.yaml" created
INFO file "redis-deploymentconfig.yaml" created
INFO file "redis-imagestream.yaml" created
INFO file "result-deploymentconfig.yaml" created
INFO file "result-imagestream.yaml" created
INFO OpenShift file "vote-service.yaml" created
INFO OpenShift file "db-service.yaml" created
INFO OpenShift file "redis-service.yaml" created
INFO OpenShift file "result-service.yaml" created
INFO OpenShift file "vote-deploymentconfig.yaml" created
INFO OpenShift file "vote-imagestream.yaml" created
INFO OpenShift file "worker-deploymentconfig.yaml" created
INFO OpenShift file "worker-imagestream.yaml" created
INFO OpenShift file "db-deploymentconfig.yaml" created
INFO OpenShift file "db-imagestream.yaml" created
INFO OpenShift file "redis-deploymentconfig.yaml" created
INFO OpenShift file "redis-imagestream.yaml" created
INFO OpenShift file "result-deploymentconfig.yaml" created
INFO OpenShift file "result-imagestream.yaml" created
```

In similar way you can convert DAB files to OpenShift.
```console
$ kompose --bundle docker-compose-bundle.dab --provider openshift convert
WARN: Unsupported key networks - ignoring
INFO file "redis-svc.yaml" created
INFO file "web-svc.yaml" created
INFO file "web-deploymentconfig.yaml" created
INFO file "web-imagestream.yaml" created
INFO file "redis-deploymentconfig.yaml" created
INFO file "redis-imagestream.yaml" created
INFO OpenShift file "redis-svc.yaml" created
INFO OpenShift file "web-svc.yaml" created
INFO OpenShift file "web-deploymentconfig.yaml" created
INFO OpenShift file "web-imagestream.yaml" created
INFO OpenShift file "redis-deploymentconfig.yaml" created
INFO OpenShift file "redis-imagestream.yaml" created
```

It also supports creating buildconfig for build directive in a service. By default, it uses the remote repo for the current git branch as the source repo, and the current branch as the source branch for the build. You can specify a different source repo and branch using ``--build-repo`` and ``--build-branch`` options respectively.

```console
$ kompose --provider openshift --file buildconfig/docker-compose.yml convert
WARN [foo] Service cannot be created because of missing port.
INFO Buildconfig using git@github.com:rtnpro/kompose.git::master as source.
INFO file "foo-deploymentconfig.yaml" created
INFO file "foo-imagestream.yaml" created
INFO file "foo-buildconfig.yaml" created
INFO OpenShift Buildconfig using git@github.com:rtnpro/kompose.git::master as source.
INFO OpenShift file "foo-deploymentconfig.yaml" created
INFO OpenShift file "foo-imagestream.yaml" created
INFO OpenShift file "foo-buildconfig.yaml" created
```

**Note**: If you are manually pushing the Openshift artifacts using ``oc create -f``, you need to ensure that you push the imagestream artifact before the buildconfig artifact, to workaround this Openshift issue: https://github.com/openshift/origin/issues/4518 .
Expand Down Expand Up @@ -243,29 +243,29 @@ The default `kompose` transformation will generate Kubernetes [Deployments](http

```console
$ kompose convert -j
file "redis-svc.json" created
file "web-svc.json" created
file "redis-deployment.json" created
file "web-deployment.json" created
INFO Kubernetes file "redis-svc.json" created
INFO Kubernetes file "web-svc.json" created
INFO Kubernetes file "redis-deployment.json" created
INFO Kubernetes file "web-deployment.json" created
```
The `*-deployment.json` files contain the Deployment objects.

```console
$ kompose convert --replication-controller
file "redis-svc.yaml" created
file "web-svc.yaml" created
file "redis-replicationcontroller.yaml" created
file "web-replicationcontroller.yaml" created
INFO Kubernetes file "redis-svc.yaml" created
INFO Kubernetes file "web-svc.yaml" created
INFO Kubernetes file "redis-replicationcontroller.yaml" created
INFO Kubernetes file "web-replicationcontroller.yaml" created
```

The `*-replicationcontroller.yaml` files contain the Replication Controller objects. If you want to specify replicas (default is 1), use `--replicas` flag: `$ kompose convert --replication-controller --replicas 3`

```console
$ kompose convert --daemon-set
file "redis-svc.yaml" created
file "web-svc.yaml" created
file "redis-daemonset.yaml" created
file "web-daemonset.yaml" created
INFO Kubernetes file "redis-svc.yaml" created
INFO Kubernetes file "web-svc.yaml" created
INFO Kubernetes file "redis-daemonset.yaml" created
INFO Kubernetes file "web-daemonset.yaml" created
```

The `*-daemonset.yaml` files contain the Daemon Set objects
Expand All @@ -274,10 +274,10 @@ If you want to generate a Chart to be used with [Helm](https://github.com/kubern

```console
$ kompose convert -c
file "web-svc.yaml" created
file "redis-svc.yaml" created
file "web-deployment.yaml" created
file "redis-deployment.yaml" created
INFO Kubernetes file "web-svc.yaml" created
INFO Kubernetes file "redis-svc.yaml" created
INFO Kubernetes file "web-deployment.yaml" created
INFO Kubernetes file "redis-deployment.yaml" created
chart created in "./docker-compose/"

$ tree docker-compose/
Expand Down Expand Up @@ -400,4 +400,4 @@ If the Docker Compose file has a volume specified for a service, the Deployment

If the Docker Compose file has service name with `_` in it (eg.`web_service`), then it will be replaced by `-` and the service name will be renamed accordingly (eg.`web-service`). Kompose does this because "Kubernetes" doesn't allow `_` in object name.

Please note that changing service name might break some `docker-compose` files.
Please note that changing service name might break some `docker-compose` files.

0 comments on commit dbf15e2

Please sign in to comment.