Skip to content
This repository was archived by the owner on Mar 18, 2020. It is now read-only.

Commit 256c8b2

Browse files
committed
Restructured to match Kubernetes server.
Closes #5
1 parent 32665b5 commit 256c8b2

File tree

12 files changed

+250
-98
lines changed

12 files changed

+250
-98
lines changed

README.md

+3-21
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,12 @@
1-
# spring-cloud-dataflow-server-openshift
1+
# Spring Cloud Data Flow Server for OpenShift
22

33
This project provides a Spring Cloud Data Flow server for deployments to OpenShift 3, using the
44
[Spring Cloud Deployer OpenShift](https://github.com/donovanmuller/spring-cloud-deployer-openshift)
55
implementation of the [Spring Cloud Deployer](https://github.com/spring-cloud/spring-cloud-deployer) SPI.
66

77
## Building
88

9-
The `spring-cloud-deployer-openshift` project is an extension of
10-
[`spring-cloud-deployer-kubernetes`](https://github.com/spring-cloud/spring-cloud-deployer-kubernetes).
11-
There are some suggested modifications to this and the [`spring-cloud-deployer`](https://github.com/spring-cloud/spring-cloud-deployer)
12-
project that aid in this extension and until those modifications are either considered for inclusion in the upstream
13-
projects or are rejected, you must clone and install these forked repositories:
14-
15-
* [spring-cloud-deployer-kubernetes](https://github.com/donovanmuller/spring-cloud-deployer-kubernetes) - donovanmuller/spring-cloud-deployer-kubernetes
16-
17-
The following PR's have been opened to include the modifications mentioned above in the upstream projects:
18-
19-
* ~~spring-cloud-deployer-kubernetes [[#40](https://github.com/spring-cloud/spring-cloud-deployer-kubernetes/pull/40)]~~ merged as [634ce96](https://github.com/spring-cloud/spring-cloud-deployer-kubernetes/commit/634ce96dc10383b88c17ceaa2e75582005122c5c)
20-
21-
```
22-
$ git clone https://github.com/donovanmuller/spring-cloud-deployer-kubernetes.git && \
23-
cd spring-cloud-deployer-kubernetes && \
24-
./mvnw install
25-
```
26-
27-
Once these projects have been built successfully, you can clone and build the `spring-cloud-deployer-openshift` and
9+
You must clone and build the `spring-cloud-deployer-openshift` and
2810
`spring-cloud-dataflow-server-openshift` projects:
2911

3012
```
@@ -49,7 +31,7 @@ $ java -Dopenshift.url=https://172.28.128.4:8443 \
4931
-Dkubernetes.trust.certificates=true \
5032
-Dkubernetes.auth.basic.username=admin \
5133
-Dkubernetes.auth.basic.password=admin \
52-
-jar spring-cloud-dataflow-server-openshift-1.0.0.BUILD-SNAPSHOT.jar \
34+
-jar spring-cloud-dataflow-server-openshift-1.1.0.BUILD-SNAPSHOT.jar \
5335
--spring.cloud.deployer.kubernetes.namespace=scdf-apps \
5436
--maven.resolvePom=true \
5537
--maven.remote-repositories.spring.url=http://repo.spring.io/snapshots

pom.xml

+59-70
Original file line numberDiff line numberDiff line change
@@ -12,99 +12,61 @@
1212
</parent>
1313

1414
<groupId>org.springframework.cloud</groupId>
15-
<artifactId>spring-cloud-dataflow-server-openshift</artifactId>
16-
<version>1.0.1.BUILD-SNAPSHOT</version>
15+
<artifactId>spring-cloud-dataflow-server-openshift-parent</artifactId>
16+
<version>1.1.0.BUILD-SNAPSHOT</version>
17+
<packaging>pom</packaging>
1718

1819
<name>Spring Cloud Data Flow Server for OpenShift</name>
1920
<description>A Spring Cloud Data Flow Deployer Server for OpenShift 3</description>
2021

22+
<modules>
23+
<module>spring-cloud-dataflow-server-openshift-autoconfig</module>
24+
<module>spring-cloud-dataflow-server-openshift</module>
25+
</modules>
26+
2127
<properties>
22-
<start-class>org.springframework.cloud.dataflow.server.kubernetes.OpenShiftDataFlowServer</start-class>
28+
<spring-cloud-deployer-openshift.version>1.1.0.BUILD-SNAPSHOT</spring-cloud-deployer-openshift.version>
29+
<spring-cloud-dataflow.version>1.1.0.BUILD-SNAPSHOT</spring-cloud-dataflow.version>
30+
<spring-cloud-deployer-spi.version>1.1.0.RC1</spring-cloud-deployer-spi.version>
31+
<spring-cloud-kubernetes.version>0.1.3</spring-cloud-kubernetes.version>
32+
<netflix-archaius.version>0.7.4</netflix-archaius.version>
2333
</properties>
2434

2535
<dependencyManagement>
2636
<dependencies>
2737
<dependency>
2838
<groupId>org.springframework.cloud</groupId>
2939
<artifactId>spring-cloud-deployer-openshift</artifactId>
30-
<version>1.1.0.BUILD-SNAPSHOT</version>
40+
<version>${spring-cloud-deployer-openshift.version}</version>
3141
</dependency>
3242
<dependency>
3343
<groupId>org.springframework.cloud</groupId>
34-
<artifactId>spring-cloud-starter-dataflow-server-kubernetes</artifactId>
35-
<version>1.1.0.BUILD-SNAPSHOT</version>
44+
<artifactId>spring-cloud-dataflow-server-core</artifactId>
45+
<version>${spring-cloud-dataflow.version}</version>
3646
</dependency>
3747
<dependency>
3848
<groupId>org.springframework.cloud</groupId>
3949
<artifactId>spring-cloud-deployer-spi</artifactId>
40-
<version>1.1.0.RC1</version>
50+
<version>${spring-cloud-deployer-spi.version}</version>
51+
</dependency>
52+
<dependency>
53+
<groupId>io.fabric8</groupId>
54+
<artifactId>spring-cloud-starter-kubernetes</artifactId>
55+
<version>${spring-cloud-kubernetes.version}</version>
56+
</dependency>
57+
<dependency>
58+
<groupId>io.fabric8</groupId>
59+
<artifactId>spring-cloud-kubernetes-archaius</artifactId>
60+
<version>${spring-cloud-kubernetes.version}</version>
61+
</dependency>
62+
<dependency>
63+
<groupId>com.netflix.archaius</groupId>
64+
<artifactId>archaius-core</artifactId>
65+
<version>${netflix-archaius.version}</version>
4166
</dependency>
4267
</dependencies>
4368
</dependencyManagement>
4469

45-
<dependencies>
46-
<dependency>
47-
<groupId>org.springframework.cloud</groupId>
48-
<artifactId>spring-cloud-deployer-openshift</artifactId>
49-
</dependency>
50-
<dependency>
51-
<groupId>org.springframework.cloud</groupId>
52-
<artifactId>spring-cloud-starter-dataflow-server-kubernetes</artifactId>
53-
</dependency>
54-
<dependency>
55-
<groupId>org.springframework.cloud</groupId>
56-
<artifactId>spring-cloud-deployer-resource-support</artifactId>
57-
</dependency>
58-
</dependencies>
59-
60-
<build>
61-
<resources>
62-
<resource>
63-
<directory>src/main/resources</directory>
64-
<filtering>true</filtering>
65-
<includes>
66-
<include>META-INF/*.properties</include>
67-
<include>META-INF/spring.factories</include>
68-
<include>dataflow-server.yml</include>
69-
</includes>
70-
</resource>
71-
</resources>
72-
<plugins>
73-
<plugin>
74-
<groupId>org.apache.maven.plugins</groupId>
75-
<artifactId>maven-resources-plugin</artifactId>
76-
</plugin>
77-
<plugin>
78-
<groupId>org.springframework.boot</groupId>
79-
<artifactId>spring-boot-maven-plugin</artifactId>
80-
</plugin>
81-
<plugin>
82-
<groupId>io.fabric8</groupId>
83-
<artifactId>docker-maven-plugin</artifactId>
84-
<version>0.17.2</version>
85-
<configuration>
86-
<images>
87-
<image>
88-
<name>springcloud/${project.artifactId}</name>
89-
<build>
90-
<from>java:8-alpine</from>
91-
<volumes>
92-
<volume>/tmp</volume>
93-
</volumes>
94-
<entryPoint>
95-
exec java $JAVA_OPTS -Djava.security.egd=file:/dev/urandom -jar /maven/spring-cloud-dataflow-server-openshift.jar
96-
</entryPoint>
97-
<assembly>
98-
<descriptor>assembly.xml</descriptor>
99-
</assembly>
100-
</build>
101-
</image>
102-
</images>
103-
</configuration>
104-
</plugin>
105-
</plugins>
106-
</build>
107-
10870
<profiles>
10971
<profile>
11072
<id>spring</id>
@@ -156,5 +118,32 @@
156118
</pluginRepository>
157119
</pluginRepositories>
158120
</profile>
121+
<profile>
122+
<id>release-sign-artifacts</id>
123+
<activation>
124+
<property>
125+
<name>performRelease</name>
126+
<value>true</value>
127+
</property>
128+
</activation>
129+
<build>
130+
<plugins>
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-gpg-plugin</artifactId>
134+
<version>1.6</version>
135+
<executions>
136+
<execution>
137+
<id>sign-artifacts</id>
138+
<phase>verify</phase>
139+
<goals>
140+
<goal>sign</goal>
141+
</goals>
142+
</execution>
143+
</executions>
144+
</plugin>
145+
</plugins>
146+
</build>
147+
</profile>
159148
</profiles>
160149
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<artifactId>spring-cloud-dataflow-server-openshift-parent</artifactId>
9+
<groupId>org.springframework.cloud</groupId>
10+
<version>1.1.0.BUILD-SNAPSHOT</version>
11+
</parent>
12+
13+
<artifactId>spring-cloud-dataflow-server-openshift-autoconfig</artifactId>
14+
15+
<dependencies>
16+
<dependency>
17+
<groupId>org.springframework.cloud</groupId>
18+
<artifactId>spring-cloud-deployer-openshift</artifactId>
19+
</dependency>
20+
<dependency>
21+
<groupId>org.springframework.cloud</groupId>
22+
<artifactId>spring-cloud-dataflow-server-core</artifactId>
23+
</dependency>
24+
<dependency>
25+
<groupId>org.mariadb.jdbc</groupId>
26+
<artifactId>mariadb-java-client</artifactId>
27+
<scope>runtime</scope>
28+
</dependency>
29+
<dependency>
30+
<groupId>org.postgresql</groupId>
31+
<artifactId>postgresql</artifactId>
32+
<scope>runtime</scope>
33+
</dependency>
34+
<dependency>
35+
<groupId>io.fabric8</groupId>
36+
<artifactId>spring-cloud-starter-kubernetes</artifactId>
37+
<scope>runtime</scope>
38+
</dependency>
39+
<dependency>
40+
<groupId>io.fabric8</groupId>
41+
<artifactId>spring-cloud-kubernetes-archaius</artifactId>
42+
<scope>runtime</scope>
43+
</dependency>
44+
<dependency>
45+
<groupId>com.netflix.archaius</groupId>
46+
<artifactId>archaius-core</artifactId>
47+
<scope>runtime</scope>
48+
</dependency>
49+
</dependencies>
50+
<build>
51+
<resources>
52+
<resource>
53+
<directory>src/main/resources</directory>
54+
<filtering>true</filtering>
55+
<includes>
56+
<include>META-INF/spring.factories</include>
57+
</includes>
58+
</resource>
59+
</resources>
60+
<plugins>
61+
<plugin>
62+
<groupId>org.apache.maven.plugins</groupId>
63+
<artifactId>maven-resources-plugin</artifactId>
64+
</plugin>
65+
</plugins>
66+
</build>
67+
</project>

src/main/java/org/springframework/cloud/dataflow/server/kubernetes/OpenShiftDataFlowServerAutoConfiguration.java renamed to spring-cloud-dataflow-server-openshift-autoconfig/src/main/java/org/springframework/cloud/dataflow/server/openshift/OpenShiftDataFlowServerAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.cloud.dataflow.server.kubernetes;
17+
package org.springframework.cloud.dataflow.server.openshift;
1818

1919
import java.util.HashMap;
2020
import java.util.Map;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
org.sspringframework.boot.autoconfigure.EnableAutoConfiguration=\
2+
org.springframework.cloud.dataflow.server.openshift.OpenShiftDataFlowServerAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<artifactId>spring-cloud-dataflow-server-openshift-parent</artifactId>
9+
<groupId>org.springframework.cloud</groupId>
10+
<version>1.1.0.BUILD-SNAPSHOT</version>
11+
</parent>
12+
13+
<artifactId>spring-cloud-dataflow-server-openshift</artifactId>
14+
15+
<!-- Used in the Spring Boot Banner -->
16+
<name>OpenShift Data Flow Server</name>
17+
18+
<properties>
19+
<start-class>org.springframework.cloud.dataflow.server.openshift.OpenShiftDataFlowServer</start-class>
20+
</properties>
21+
22+
<dependencies>
23+
<dependency>
24+
<groupId>org.springframework.cloud</groupId>
25+
<artifactId>spring-cloud-dataflow-server-openshift-autoconfig</artifactId>
26+
<version>${project.version}</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.mariadb.jdbc</groupId>
30+
<artifactId>mariadb-java-client</artifactId>
31+
<scope>runtime</scope>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.postgresql</groupId>
35+
<artifactId>postgresql</artifactId>
36+
<scope>runtime</scope>
37+
</dependency>
38+
<dependency>
39+
<groupId>io.fabric8</groupId>
40+
<artifactId>spring-cloud-starter-kubernetes</artifactId>
41+
</dependency>
42+
<dependency>
43+
<groupId>io.fabric8</groupId>
44+
<artifactId>spring-cloud-kubernetes-archaius</artifactId>
45+
</dependency>
46+
<dependency>
47+
<groupId>com.netflix.archaius</groupId>
48+
<artifactId>archaius-core</artifactId>
49+
</dependency>
50+
</dependencies>
51+
<build>
52+
<resources>
53+
<resource>
54+
<directory>src/main/resources</directory>
55+
<filtering>true</filtering>
56+
<includes>
57+
<include>META-INF/*.properties</include>
58+
<include>META-INF/spring.factories</include>
59+
<include>dataflow-server.yml</include>
60+
</includes>
61+
</resource>
62+
</resources>
63+
<plugins>
64+
<plugin>
65+
<groupId>org.apache.maven.plugins</groupId>
66+
<artifactId>maven-resources-plugin</artifactId>
67+
</plugin>
68+
<plugin>
69+
<groupId>org.springframework.boot</groupId>
70+
<artifactId>spring-boot-maven-plugin</artifactId>
71+
</plugin>
72+
<plugin>
73+
<groupId>io.fabric8</groupId>
74+
<artifactId>docker-maven-plugin</artifactId>
75+
<version>0.18.1</version>
76+
<configuration>
77+
<images>
78+
<image>
79+
<name>springcloud/${project.artifactId}</name>
80+
<build>
81+
<from>java:8-alpine</from>
82+
<volumes>
83+
<volume>/tmp</volume>
84+
</volumes>
85+
<entryPoint>
86+
exec java $JAVA_OPTS -Djava.security.egd=file:/dev/urandom -jar /maven/spring-cloud-dataflow-server-openshift.jar
87+
</entryPoint>
88+
<assembly>
89+
<descriptor>assembly.xml</descriptor>
90+
</assembly>
91+
</build>
92+
</image>
93+
</images>
94+
</configuration>
95+
</plugin>
96+
</plugins>
97+
</build>
98+
</project>

0 commit comments

Comments
 (0)