All Downloads are FREE. Search and download functionalities are using the official Maven repository.

archetype-resources.quickstart-template.json Maven / Gradle / Ivy

Go to download

Creates a new Shows how to use Camel with Spring Boot in the Java Container

There is a newer version: 2.2.197
Show newest version
#set( $H = '##' )
#set( $D = '$' )
{
  "apiVersion": "v1",
  "kind": "Template",
  "labels": {},
  "metadata": {
    "annotations": {
      "description": "# Spring-Boot Camel QuickStart\n\nThis example demonstrates how you can use Apache Camel with Spring Boot\nbased on a [fabric8 Java base image](https://github.com/fabric8io/base-images#java-base-images)\n\nThe quickstart uses Spring Boot to configure a little application that includes a Camel\nroute that triggeres a message every 5th second, and routes the message to a log.\n\n\n${H}# Building\n\nThe example can be built with\n\n    mvn clean install\n\n\n${H}# Running the example locally\n\nThe example can be run locally using the following Maven goal:\n\n    mvn spring-boot:run\n\n\n${H}# Running the example in fabric8\n\nIt is assumed a running Kubernetes platform is already running. If not you can find details how to [get started](http://fabric8.io/guide/getStarted/index.html).\n\nThe example can be built and deployed using a single goal:\n\n    mvn -Pf8-local-deploy\n\nWhen the example runs in fabric8, you can use the OpenShift client tool to inspect the status\n\nTo list all the running pods:\n\n    oc get pods\n\nThen find the name of the pod that runs this quickstart, and output the logs from the running pods with:\n\n    oc logs \n\nYou can also use the fabric8 [web console](http://fabric8.io/guide/console.html) to manage the\nrunning pods, and view logs and much more.\n\n\n${H}# More details\n\nYou can find more details about running this [quickstart](http://fabric8.io/guide/quickstarts/running.html) on the website. This also includes instructions how to change the Docker image user and registry.\n\n",
      "iconClass": "icon-java"
    },
    "labels": {},
    "name": "s2i-quickstart-spring-boot-camel"
  },
  "parameters": [
    {
      "name": "APP_NAME",
      "value": "s2i-quickstart-spring-boot-camel",
      "description": "Application Name"
    },
    {
      "name": "GIT_REPO",
      "required": true,
      "description": "Git repository, required"
    },
    {
      "name": "GIT_REF",
      "value": "master",
      "description": "Git ref to build"
    },
    {
      "name": "SERVICE_NAME",
      "value": "s2i-qs-spring-boot-camel",
      "description": "Exposed Service name"
    },
    {
      "name": "BUILDER_VERSION",
      "value": "1.2.5",
      "description": "Builder version"
    },
    {
      "name": "APP_VERSION",
      "value": "2.2.64-SNAPSHOT",
      "description": "Application version"
    },
    {
      "name": "MAVEN_ARGS",
      "value": "package -DskipTests -e",
      "description": "Arguments passed to mvn in the build"
    },
    {
      "name": "MAVEN_ARGS_APPEND",
      "description": "Extra arguments passed to mvn, e.g. for multi-module builds"
    },
    {
      "name": "ARTIFACT_DIR",
      "description": "Maven build directory"
    },
    {
      "generate": "expression",
      "name": "BUILD_SECRET",
      "description": "The secret needed to trigger a build",
      "from": "[a-zA-Z0-9]{8}"
    }
  ],
  "objects": [
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "s2i-java-${D}{APP_NAME}",
        "creationTimestamp": null,
        "labels": {
          "component": "${D}{APP_NAME}",
          "container": "java",
          "group": "quickstarts",
          "project": "${D}{APP_NAME}",
          "provider": "s2i",
          "version": "${D}{APP_VERSION}"
        }
      },
      "spec": {
        "dockerImageRepository": "fabric8/s2i-java:${D}{BUILDER_VERSION}"
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "${D}{APP_NAME}",
        "creationTimestamp": null,
        "labels": {
          "component": "${D}{APP_NAME}",
          "container": "java",
          "group": "quickstarts",
          "project": "${D}{APP_NAME}",
          "provider": "s2i",
          "version": "${D}{APP_VERSION}"
        }
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "${D}{APP_NAME}",
        "creationTimestamp": null,
        "labels": {
          "component": "${D}{APP_NAME}",
          "container": "java",
          "group": "quickstarts",
          "project": "${D}{APP_NAME}",
          "provider": "s2i",
          "version": "${D}{APP_VERSION}"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "${D}{BUILD_SECRET}"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "${D}{BUILD_SECRET}"
            }
          },
          {
            "type": "ConfigChange"
          },
          {
            "type": "ImageChange",
            "imageChange": {}
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "${D}{GIT_REPO}",
            "ref": "${D}{GIT_REF}"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "s2i-java-${D}{APP_NAME}:${D}{BUILDER_VERSION}"
            },
            "forcePull": true,
            "env": [
              {
                "name": "BUILD_LOGLEVEL",
                "value": "5"
              },
              {
                "name": "ARTIFACT_DIR",
                "value": "${D}{ARTIFACT_DIR}"
              },
              {
                "name": "MAVEN_ARGS",
                "value": "${D}{MAVEN_ARGS}"
              },
              {
                "name": "MAVEN_ARGS_APPEND",
                "value": "${D}{MAVEN_ARGS_APPEND}"
              }
            ]
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "${D}{APP_NAME}:latest"
          }
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "${D}{APP_NAME}",
        "creationTimestamp": null,
        "labels": {
          "component": "${D}{APP_NAME}",
          "container": "java",
          "group": "quickstarts",
          "project": "${D}{APP_NAME}",
          "provider": "s2i",
          "version": "${D}{APP_VERSION}"
        }
      },
      "spec": {
        "strategy": {
          "resources": {}
        },
        "triggers": [
          {
            "type": "ConfigChange"
          },
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "${D}{APP_NAME}"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "${D}{APP_NAME}:latest"
              }
            }
          }
        ],
        "replicas": 1,
        "selector": {
          "component": "${D}{APP_NAME}",
          "container": "java",
          "deploymentconfig": "${D}{APP_NAME}",
          "group": "quickstarts",
          "project": "${D}{APP_NAME}",
          "provider": "s2i",
          "version": "${D}{APP_VERSION}"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "component": "${D}{APP_NAME}",
              "container": "java",
              "deploymentconfig": "${D}{APP_NAME}",
              "group": "quickstarts",
              "project": "${D}{APP_NAME}",
              "provider": "s2i",
              "version": "${D}{APP_VERSION}"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "${D}{APP_NAME}",
                "image": "library/${D}{APP_NAME}:latest",
                "readinessProbe": {
                  "exec": {
                    "command": [
                      "/bin/bash",
                      "-c",
                      "(curl -f 127.0.0.1:8778) >/dev/null 2>&1; test $? != 7"
                    ]
                  },
                  "initialDelaySeconds": 30,
                  "timeoutSeconds": 5
                },
                "ports": [
                  {
                    "containerPort": 8778,
                    "name": "jolokia",
                    "protocol": "TCP"
                  }
                ],
                "resources": {}
              }
            ]
          }
        }
      },
      "status": {}
    }
  ]
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy