Giter Club home page Giter Club logo

ycrash-k8s's Introduction

ycrash-k8s

If you want to quickly run the latest yCrash version on Kubernetes then follow steps given here.

You can also integrate yCrash with the Prometheus. For more details visit Integrate yCrash with Prometheus page.

If you wish to build Docker image of yCrash server and run it on Kubernetes by yourself then follow the setps given below:

Setup

  1. Clone the repo:

     SSH - git clone [email protected]:ycrash/ycrash-k8s.git
     HTTPS - git clone https://github.com/ycrash/ycrash-k8s.git
    
     cd ycrash-k8s
  2. Download license.lic and put it into this directory

  3. Copy yc-agent-config.yaml.template to yc-agent-config.yaml and set the values.

    cp yc-agent-config.yaml.template yc-agent-config.yaml

Run locally with docker-compose

Prometheus integration is only supported in kubernetes setup.

Pre-requisite:

How to run

docker-compose up -d

Then see the services and the ports exposed:

docker-compose ps

Run locally with Docker (Without docker-compose)

Prometheus integration is only supported in kubernetes setup.

  1. To build images:

    docker build -t ycrash ./docker-images/ycrash
    docker build -t buggyapp ./docker-images/buggyapp
  2. To run the container locally:

    docker run -ti --rm -p 8080:8080 --name ycrash -v $(pwd)/license.lic:/opt/workspace/yc/license.lic ycrash
    docker run -ti --rm -p 9010:9010 -p 8085:8085 --name buggyapp -v $(pwd)/yc-agent-config.yaml:/opt/workspace/yc/config.yaml buggyapp

    Then open http://localhost:8080 and http://localhost:9010

Run on Kubernetes

If you run containers with the above steps, please stop them first before continuing.

Kubernetes manifests (yaml) resides in kubernetes/ directory.

  1. Copy kubernetes/yc-license-secret.yaml.template to kubernetes/yc-license-secret.yaml

    cp kubernetes/yc-license-secret.yaml.template kubernetes/yc-license-secret.yaml
    
  2. Edit kubernetes/yc-license-secret.yaml and replace the license template with the real one.

  3. Copy kubernetes/buggyapp-secret.yaml.template to kubernetes/buggyapp-secret.yaml

    cp kubernetes/buggyapp-secret.yaml.template kubernetes/buggyapp-secret.yaml
    
  4. Edit kubernetes/buggyapp-secret.yaml and set the appropriate value

  5. Assuming you have a running kubernetes cluster and kubectl ready to access the cluster, next step is to just run:

    kubectl apply -f kubernetes/ -R
    

    to verify the pods are running:

    kubectl get pods
    
  6. There are a few ways of exposing a service in kubernetes to the outside. But for the initial scope, we can access it privately with port-forward:

    kubectl port-forward deployment/yc-web 8080
    
    kubectl port-forward deployment/buggyapp 9010 8085
    
  7. Then the ycrash service should be accessible from http://localhost:8080 and buggyapp should be accessible from http://localhost:9010

Notes

  • Kubernetes deployment yaml is working. It's the simplest implementation, which is easy for initial review but not yet "production ready".

ycrash-k8s's People

Contributors

mahesh-tier1app avatar ycrash avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.