<commit_before># Deployment Manager

[![Go Report Card](http://goreportcard.com/badge/kubernetes/deployment-manager)](http://goreportcard.com/report/kubernetes/deployment-manager)

Deployment Manager (DM) provides parameterized templates for Kubernetes clusters.

You can use it deploy ready-to-use types, such as:
* [Replicated Service](types/replicatedservice/v1)
* [Redis](types/redis/v1)

Types live in ordinary Github repositories. This repository is a DM type registry.

You can also use DM to deploy simple templates that use types, such as:

* [Guestbook](examples/guestbook/guestbook.yaml)
* [Deployment Manager](examples/bootstrap/bootstrap.yaml)

A template is just a `YAML` file that supplies parameters. (Yes, you're reading
that second example correctly. It uses DM to deploy itself.
See [examples/bootstrap/README.md](examples/bootstrap/README.md) for more information.)

DM runs server side, in your Kubernetes cluster, so it can tell you what types
you've instantiated there, and even what instances you've created of a given type.
So, you can ask questions like:

* Show me all the Redis slaves running in this cluster.
* Show me all the resources used by Redis.

Because DM stores its state in the cluster, not on your workstation, you can ask
those questions from any client at any time.

Please hang out with us in
[the Slack chat room](https://kubernetes.slack.com/messages/sig-configuration/)
and/or
[the Google Group](https://groups.google.com/forum/#!forum/kubernetes-sig-config)
for the Kubernetes configuration SIG. Your feedback and contributions are welcome.

## Installing Deployment Manager

Follow these 3 steps to install DM:

1. Make sure your Kubernetes cluster is up and running, and that you can run
`kubectl` commands against it.
1. Clone this repository into the src folder of your GOPATH, if you haven't already.
1. Use `kubectl` to intall DM into your cluster:

```
kubectl create -f install.yaml
```

That's it. You can now use `kubectl` to see DM running in your cluster:

```
kubectl get pod,rc,service
```

If you see expandybird-service, manager-service, resourcifier-service, and
expandybird-rc, manager-rc and resourcifier-rc with pods that are READY, then DM
is up and running!

The easiest way to interact with Deployment Manager is through `kubectl` proxy:

```
kubectl proxy --port=8001 &
```

This command starts a proxy that lets you interact with the Kubernetes api
server through port 8001 on localhost. `dm` uses
`http://localhost:8001/api/v1/proxy/namespaces/default/services/manager-service:manager`
as the default service address for DM.

## Using Deployment Manager

You can use `dm` to deploy a type from the command line. This command deploys a
redis cluster with two workers from the type definition in this repository:

```
dm deploy redis/v1
```

When you deploy a type, you can optionally supply values for input parameters,
like this:

```
dm --properties workers=3 deploy redis/v1
```

When you deploy a type, `dm` generates a template from the type and input 
paramaters, and then deploys it. 

You can also deploy an existing template, or read one from `stdin`. This command
deploys the canonical Guestbook example from the examples directory:

```
dm deploy examples/guestbook/guestbook.yaml
```

You can now use `kubectl` to see Guestbook running:

```
kubectl get service
```

Look for frontend-service. If your cluster supports external load balancing, it
will have an external IP assigned to it, and you can navigate to it in your browser
to see the guestbook in action. 

For more information about this example, see [examples/guestbook/README.md](examples/guestbook/README.md)

## Additional commands<commit_msg>Readme fixes.<commit_after># Deployment Manager

[![Go Report Card](http://goreportcard.com/badge/kubernetes/deployment-manager)](http://goreportcard.com/report/kubernetes/deployment-manager)

Deployment Manager (DM) provides parameterized templates for Kubernetes clusters.

You can use it deploy ready-to-use types, such as:
* [Replicated Service](types/replicatedservice/v1)
* [Redis](types/redis/v1)

Types live in ordinary Github repositories. This repository is a DM type registry.

You can also use DM to deploy simple templates that use types, such as:

* [Guestbook](examples/guestbook/guestbook.yaml)
* [Deployment Manager](examples/bootstrap/bootstrap.yaml)

A template is just a `YAML` file that supplies parameters. (Yes, you're reading
that second example correctly. It uses DM to deploy itself.
See [examples/bootstrap/README.md](examples/bootstrap/README.md) for more information.)

DM runs server side, in your Kubernetes cluster, so it can tell you what types
you've instantiated there, what instances you've created of a given type, and even
how the instances are organized. So, you can ask questions like:

* What Redis instances are running in this cluster?
* What Redis master and slave services are part of this Redis instance?
* What pods are part of this Redis slave?

Because DM stores its state in the cluster, not on your workstation, you can ask
those questions from any client at any time.

Please hang out with us in
[the Slack chat room](https://kubernetes.slack.com/messages/sig-configuration/)
and/or
[the Google Group](https://groups.google.com/forum/#!forum/kubernetes-sig-config)
for the Kubernetes configuration SIG. Your feedback and contributions are welcome.

## Installing Deployment Manager

Follow these 3 steps to install DM:

1. Make sure your Kubernetes cluster is up and running, and that you can run
`kubectl` commands against it.
1. Clone this repository into the src folder of your GOPATH, if you haven't already.
1. Use `kubectl` to intall DM into your cluster:

```
kubectl create -f install.yaml
```

That's it. You can now use `kubectl` to see DM running in your cluster:

```
kubectl get pod,rc,service
```

If you see expandybird-service, manager-service, resourcifier-service, and
expandybird-rc, manager-rc and resourcifier-rc with pods that are READY, then DM
is up and running!

The easiest way to interact with Deployment Manager is through `kubectl` proxy:

```
kubectl proxy --port=8001 &
```

This command starts a proxy that lets you interact with the Kubernetes api
server through port 8001 on localhost. `dm` uses
`http://localhost:8001/api/v1/proxy/namespaces/default/services/manager-service:manager`
as the default service address for DM.

## Using Deployment Manager

You can use `dm` to deploy a type from the command line. This command deploys a
redis cluster with two workers from the type definition in this repository:

```
dm deploy redis/v1
```

When you deploy a type, you can optionally supply values for input parameters,
like this:

```
dm --properties workers=3 deploy redis/v1
```

When you deploy a type, `dm` generates a template from the type and input 
parameters, and then deploys it. 

You can also deploy an existing template, or read one from `stdin`. This command
deploys the canonical Guestbook example from the examples directory:

```
dm deploy examples/guestbook/guestbook.yaml
```

You can now use `kubectl` to see Guestbook running:

```
kubectl get service
```

Look for frontend-service. If your cluster supports external load balancing, it
will have an external IP assigned to it, and you can navigate to it in your browser
to see the guestbook in action. 

For more information about this example, see [examples/guestbook/README.md](examples/guestbook/README.md)

## Additional commands
{'fraction_non_alphanumeric': 0.07807486631016043, 'fraction_numerical': 0.0058823529411764705, 'mean_word_length': 4.680334092634776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '585572', 'n_tokens_mistral': 2197, 'n_tokens_neox': 2070, 'n_words': 975}