GithubHelp home page GithubHelp logo

ammbra / todo-chronicles Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 999 KB

Sample repo that demonstrates Dekorate capabilities across frameworks

License: MIT License

Dockerfile 3.32% Java 64.49% Shell 1.65% CSS 1.04% HTML 7.52% JavaScript 21.98%
dekorate helidon quarkus spring-boot helm-charts java knative kubernetes-manifests tekton-pipelines

todo-chronicles's Introduction

todo-chronicles

Make sure you have Java11 installed before running the code in this repository:

$ java -version

This repository contains 3 projects:

  • example-todo-app-project which is a slightly modified version of TODO Demo Application part of the Helidon examples. This project has 2 modules, both using Dekorate to generate Kubernetes manifest files:
    • helidon-examples-todo-frontend
    • helidon-examples-todo-backend
  • todo-app_quarkus is a slightly modified version of TODO Application with Quarkus.
  • todo_app_springboot is a modified version of TODO Application with Spring Boot. The version in this repo uses a different Java version, an H2 database and way to persist its data.

How to run the Helidon examples

You can run both Helidon example projects by going to todo_app_helidon folder:

$ cd todo-app-helidon
  1. If you would like to generate Kubernetes/Knative or Helm charts using the existing Docker image, please comment the Tekton dependency in the each pom.xml:
<!--        <dependency>-->
<!--            <groupId>io.dekorate</groupId>-->
<!--            <artifactId>tekton-annotations</artifactId>-->
<!--            <version>${dekorate-annotations.version}</version>-->
<!--        </dependency>-->

Then run:

$ mvn package  -Ddekorate.build=false -Ddekorate.push=false

The above command will generate:

  • the Kubernetes manifests (kubernetes.json and kubernetes.yml) under: todo-app-helidon/backend/target/classes/META-INF/dekorate for the backend module or todo-app-helidon/frontend/target/classes/META-INF/dekorate for the frontend module.

  • the Knative manifests (knative.json and knative.yml) under: todo-app-helidon/backend/target/classes/META-INF/dekorate for the backend module or todo-app-helidon/frontend/target/classes/META-INF/dekorate for the frontend module.

  • the Helm manifests under: todo-app-helidon/backend/target/classes/META-INF/dekorate/helm for the backend module or todo-app-helidon/frontend/target/classes/META-INF/dekorate/helm for the frontend module.

  1. If you would like to generate Tekton resources, comment the Knative and Helm Dekorate dependencies present in the pom.xml files:
<!--        <dependency>-->
<!--            <groupId>io.dekorate</groupId>-->
<!--            <artifactId>knative-annotations</artifactId>-->
<!--            <version>${dekorate-annotations.version}</version>-->
<!--        </dependency>-->
<!--        <dependency>-->
<!--            <groupId>io.dekorate</groupId>-->
<!--            <artifactId>helm-annotations</artifactId>-->
<!--            <version>${dekorate-annotations.version}</version>-->
<!--        </dependency>-->

Uncomment the following dependency (if commented in previous use case):

        <dependency>
            <groupId>io.dekorate</groupId>
            <artifactId>tekton-annotations</artifactId>
            <version>${dekorate-annotations.version}</version>
        </dependency>

And now run:

$ mvn package  -Ddekorate.build=false -Ddekorate.push=false

The above command will generate the Tekton manifests under:

  • todo-app-helidon/backend/target/classes/META-INF/dekorate for the backend module or
  • todo-app-helidon/frontend/target/classes/META-INF/dekorate for the frontend module.

How to run the Quarkus examples

You can run the Quarkus example project by going to todo_app_quarkus folder:

cd todo-app-quarkus

If you run the following command:

mvn clean package

you will obtain the following under todo-app-quarkus/target:

  • helm folder containing the Helm charts generated for the app.
  • kubernetes folder containing knative.json and knative.yml manifests.

If you would like to generate Kubernetes manifests, please comment the following line in todo-app-quarkus/src/main/resources/application.properties :

quarkus.kubernetes.deployment-target=knative

and run again mvn clean package. This will result in generating todo-app-quarkus/target/kubernetes/kubernetes.json and todo-app-quarkus/target/kubernetes/kubernetes.yml

How to run the SpringBoot examples

You can run both SpringBoot example projects by going to todo_app_springboot folder:

$ cd todo-app-springboot
  1. If you would like to generate Kubernetes/Knative or Helm charts using the existing Docker image, please comment the Tekton dependency in the pom.xml:
<!--        <dependency>-->
<!--            <groupId>io.dekorate</groupId>-->
<!--            <artifactId>tekton-annotations</artifactId>-->
<!--            <version>${dekorate-annotations.version}</version>-->
<!--        </dependency>-->

Then run:

$ mvn package  -Ddekorate.build=false -Ddekorate.push=false

The above command will generate:

  • the Kubernetes manifests (kubernetes.json and kubernetes.yml) under todo-app-springboot/target/classes/META-INF/dekorate.

  • the Knative manifests (knative.json and knative.yml) under todo-app-springboot/target/classes/META-INF/dekorate.

  • the Helm manifests under: todo-app-springboot/target/classes/META-INF/dekorate/helm.

  1. If you would like to generate Tekton resources, comment the Knative and Helm Dekorate dependencies present in the pom.xml files:
<!--        <dependency>-->
<!--            <groupId>io.dekorate</groupId>-->
<!--            <artifactId>knative-annotations</artifactId>-->
<!--            <version>${dekorate-annotations.version}</version>-->
<!--        </dependency>-->
<!--        <dependency>-->
<!--            <groupId>io.dekorate</groupId>-->
<!--            <artifactId>helm-annotations</artifactId>-->
<!--            <version>${dekorate-annotations.version}</version>-->
<!--        </dependency>-->

Uncomment the following dependency (if commented in previous use case):

        <dependency>
            <groupId>io.dekorate</groupId>
            <artifactId>tekton-annotations</artifactId>
            <version>${dekorate-annotations.version}</version>
        </dependency>

And now run:

$ mvn package  -Ddekorate.build=false -Ddekorate.push=false

The above command will generate the Tekton manifests under todo-app-springboot/target/classes/META-INF/dekorate.

todo-chronicles's People

Contributors

ammbra avatar

Stargazers

 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.