GithubHelp home page GithubHelp logo

rawsanj / spring-cloud-task-as-k8s-cronjob Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 3.0 71 KB

Spring Cloud Task Application running as CronJob in Kubernetes - Cron UI: https://github.com/RawSanj/spring-cronjob-currency

License: Apache License 2.0

Dockerfile 2.02% Java 97.98%
spring spring-cloud-task cronjob kubernetes spring-boot

spring-cloud-task-as-k8s-cronjob's Introduction

spring-cloud-task-as-k8s-cronjob

Spring Cloud Task Application running as CronJob in Kubernetes

A Spring Cloud Task Application which runs as CronJob in Kubernetes every minute to fetch BitCoin rates, saves the rates in Mysql and notifies Users if/when the threshold is reached.

Installation and Configuration

Pre-requisite:

MySql Server is up and running and application is configured the MySql credentials

Clone repo:
$ git clone https://github.com/RawSanj/spring-cloud-task-as-k8s-cronjob.git

Build and Run the applications:

Build and run the spring-cloud-task-as-k8s-cronjob application:

$ cd spring-cloud-task-as-k8s-cronjob

$ mvn clean package

$ mvn spring-boot:run

Run in Kubernetes

Assuming you have a Kubernetes Cluster up and running and kubectl is configured, run:

$ kubectl apply -f src/main/k8s

Or try Play with Kubernetes to quickly setup a K8S cluster:

  1. Follow the instructions to create Kubernetes cluster.

  2. Install git by running:

    $ yum install git -y

  3. Clone the repository:

    $ git clone https://github.com/RawSanj/spring-cloud-task-as-k8s-cronjob.git

  4. Update Kubernetes Secrets under src/main/k8s/cronjob.yaml file.

  5. Run spring-cloud-task-as-k8s-cronjob as Kubernetes CronJob. CronJob Pods connects to MySql server and stores Bitcoin rates every minute.

    $ cd spring-cloud-task-as-k8s-cronjob

    $ kubectl apply -f src/main/k8s

  6. Clone and deploy the UI Application - spring-cronjob-currency by running kubectl apply -f src/main/k8s

License

Apache License 2.0

Copyright (c) 2018 Sanjay Rawat

spring-cloud-task-as-k8s-cronjob's People

Contributors

dependabot[bot] avatar rawsanj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.