-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pushing new svcs stack to branch for rhmap paper reference
- Loading branch information
Showing
150 changed files
with
6,430 additions
and
6,717 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,217 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.redhat.refarch.microservices</groupId> | ||
<artifactId>admin-service</artifactId> | ||
<version>1.0</version> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<start-class>com.redhat.refarch.ecom.Application</start-class> | ||
|
||
<fabric8.version>2.2.170.redhat-000010</fabric8.version> | ||
<groovy.version>2.4.11</groovy.version> | ||
<groovy.eclipse.batch.version>2.4.3-01</groovy.eclipse.batch.version> | ||
<groovy.eclipse.compiler.version>2.9.2-01</groovy.eclipse.compiler.version> | ||
<gson.version>2.8.1</gson.version> | ||
<java.target.version>1.8</java.target.version> | ||
<json-simple.version>1.1.1</json-simple.version> | ||
<http-client.version>4.5.3</http-client.version> | ||
<spring-boot.version>1.5.3.RELEASE</spring-boot.version> | ||
<spring-data.version>1.10.3.RELEASE</spring-data.version> | ||
|
||
<fabric8.maven.plugin.version>3.1.80.redhat-000010</fabric8.maven.plugin.version> | ||
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version> | ||
<maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version> | ||
</properties> | ||
|
||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<!-- abstraction to property value doesn't work --> | ||
<version>1.5.3.RELEASE</version> | ||
<relativePath/> | ||
</parent> | ||
|
||
<repositories> | ||
<!-- explicitly defining central so some build latency is removed on OCP --> | ||
<repository> | ||
<id>localrepository</id> | ||
<url>file:///tmp/artifacts/m2</url> | ||
</repository> | ||
</repositories> | ||
<pluginRepositories> | ||
<!-- explicitly defining central so some build latency is removed on OCP --> | ||
<pluginRepository> | ||
<id>localrepository</id> | ||
<url>file:///tmp/artifacts/m2</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>fabric8-project-bom-camel-spring-boot</artifactId> | ||
<version>${fabric8.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
|
||
<!-- POGO Models --> | ||
<dependency> | ||
<groupId>com.redhat.refarch.microservices</groupId> | ||
<artifactId>model</artifactId> | ||
<version>1.0</version> | ||
</dependency> | ||
|
||
<!-- Enabling health checks --> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-actuator</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-mongodb</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
</dependency> | ||
|
||
<!-- ActiveMQ --> | ||
<dependency> | ||
<groupId>org.apache.activemq</groupId> | ||
<artifactId>activemq-camel</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.activemq</groupId> | ||
<artifactId>activemq-pool</artifactId> | ||
</dependency> | ||
|
||
<!-- Camel --> | ||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-spring-boot-starter</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-spring-javaconfig</artifactId> | ||
</dependency> | ||
|
||
|
||
<!-- ws.rs --> | ||
<dependency> | ||
<groupId>javax.ws.rs</groupId> | ||
<artifactId>javax.ws.rs-api</artifactId> | ||
<version>2.0.1</version> | ||
</dependency> | ||
|
||
<!-- Groovy --> | ||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy-all</artifactId> | ||
<version>${groovy.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
<version>${gson.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpclient</artifactId> | ||
<version>${http-client.version}</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<testResources> | ||
<testResource> | ||
<directory>src/test/resources</directory> | ||
<filtering>true</filtering> | ||
</testResource> | ||
</testResources> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<version>${spring-boot.version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>repackage</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${maven-compiler-plugin.version}</version> | ||
<configuration> | ||
<source>${java.target.version}</source> | ||
<target>${java.target.version}</target> | ||
<compilerId>groovy-eclipse-compiler</compilerId> | ||
</configuration> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy-eclipse-compiler</artifactId> | ||
<version>${groovy.eclipse.compiler.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy-eclipse-batch</artifactId> | ||
<version>${groovy.eclipse.batch.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>fabric8-maven-plugin</artifactId> | ||
<version>${fabric8.maven.plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>resource</goal> | ||
<goal>build</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>${maven-surefire-plugin.version}</version> | ||
<inherited>true</inherited> | ||
<configuration> | ||
<excludes> | ||
<exclude>**/*KT.java</exclude> | ||
</excludes> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- | ||
resources: | ||
requests: | ||
cpu: "0.2" | ||
# memory: 256Mi | ||
limits: | ||
cpu: "1.0" | ||
# memory: 256Mi | ||
env: | ||
- name: ACTIVEMQ_SERVICE_NAME | ||
value: broker-amq-tcp |
38 changes: 38 additions & 0 deletions
38
Admin/src/main/java/com/redhat/refarch/ecom/AppRoute.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Copyright 2005-2017 Red Hat, Inc. | ||
* <p> | ||
* Red Hat licenses this file to you under the Apache License, version | ||
* 2.0 (the "License") you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
* implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
package com.redhat.refarch.ecom | ||
|
||
import com.redhat.refarch.ecom.service.AdminService | ||
import org.apache.camel.spring.SpringRouteBuilder | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.stereotype.Component | ||
|
||
@Component | ||
class AppRoute extends SpringRouteBuilder { | ||
|
||
@Autowired | ||
AdminService adminService | ||
|
||
@Override | ||
void configure() throws Exception { | ||
|
||
from("amq:admin.reset") | ||
.bean(adminService, "resetData") | ||
|
||
from("amq:admin.testApi") | ||
.bean(adminService, "testApi") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
Admin/src/main/java/com/redhat/refarch/ecom/CamelConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2005-2017 Red Hat, Inc. | ||
* | ||
* Red Hat licenses this file to you under the Apache License, version | ||
* 2.0 (the "License") you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
* implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
package com.redhat.refarch.ecom | ||
|
||
import org.apache.camel.CamelContext | ||
import org.apache.camel.spring.boot.CamelContextConfiguration | ||
import org.apache.camel.spring.javaconfig.CamelConfiguration | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.ComponentScan | ||
import org.springframework.context.annotation.Configuration | ||
|
||
/*** | ||
* @author [email protected] | ||
*/ | ||
@Configuration | ||
@ComponentScan("com.redhat.refarch.ecom.admin") | ||
class CamelConfig extends CamelConfiguration { | ||
|
||
@Bean | ||
CamelContextConfiguration contextConfiguration() { | ||
return new CamelContextConfiguration() { | ||
|
||
@Override | ||
void beforeApplicationStart(CamelContext context) { | ||
context.setTracing(true) | ||
} | ||
|
||
@Override | ||
void afterApplicationStart(CamelContext context) {} | ||
} | ||
} | ||
} |
Oops, something went wrong.