
> kyma template

## Installation

```bash
npm install -g yo
npm install -g generator-kyma
```

Then generate your new project:

```bash
yo kyma
```
## Pre-requisite 

1. Configure your dev-space/local environment against K8S Kyma cluster as it required by the generator steps.
    - use export KUBECONFIG=[path to kubeconfig file]
    
    or
    
    - `mkdir ~/.kube/config`. 
    - `vim config` - put your kyma cluster `kubeconfig` file ,
    
    - check you are able to access to kyma cluster via `kubectl config get-contexts`
2. Using the generated `Makefile` target 'push' require `log-in` to `docker-registry`, use `img login`.
3. Use target `deploy` to `build` `push` and `update` the deployment file with the new docker image.
     
## The generated project contain the following files:

 - `app` folder  - Application code
 - `k8s` folder - k8s resources
    - `api.yaml` - API Exposure
    - `servicebindings.yaml` - Service binding and usage crd
    - `eventbinding.yaml` - Event subscription and activation
    - `deployment.yaml` - Main deployment
    - `service.yaml` - Service implementation 
  - `Dockerfile` - Application docker image
  - `Makefile` - Contain the following targets:
    - `build` - Build docker image
    - `push` - Push Docker image
    - `update-deployment` - After the docker image has pushed to the registry use this target to 
      update the deployment image 
    - `deploy` - execute `build` `push` and `update-deployment` targets  
    
        
## License

Apache-2.0 © [tals]()

[npm-image]: https://badge.fury.io/js/generator-kyma.svg
[npm-url]: https://npmjs.org/package/generator-kyma
[travis-image]: https://travis-ci.com/ShimiT/generator-kyma.svg?branch=master
[travis-url]: https://travis-ci.com/ShimiT/generator-kyma
[daviddm-image]: https://david-dm.org/ShimiT/generator-kyma.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/ShimiT/generator-kyma
[coveralls-image]: https://coveralls.io/repos/ShimiT/generator-kyma/badge.svg
[coveralls-url]: https://coveralls.io/r/ShimiT/generator-kyma
