-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pushing code as-is to allow for concurrent development on the Spring …
…introspection feature
- Loading branch information
1 parent
f6dc146
commit 9ea3251
Showing
30 changed files
with
350 additions
and
122 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
3 changes: 1 addition & 2 deletions
3
...re/storage/AzureStorageBlobsResource.java → .../resources/AzureStorageBlobsResource.java
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
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
File renamed without changes.
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
31 changes: 31 additions & 0 deletions
31
...rc/main/java/com/microsoft/aspire/extensions/spring/resources/EurekaServiceDiscovery.java
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,31 @@ | ||
package com.microsoft.aspire.extensions.spring.resources; | ||
|
||
import com.microsoft.aspire.resources.DockerFile; | ||
import com.microsoft.aspire.resources.ResourceType; | ||
import com.microsoft.aspire.resources.traits.ResourceWithTemplate; | ||
|
||
import java.util.List; | ||
|
||
public class EurekaServiceDiscovery extends DockerFile<EurekaServiceDiscovery> | ||
implements ResourceWithTemplate<EurekaServiceDiscovery> { | ||
|
||
public EurekaServiceDiscovery(String name) { | ||
super(ResourceType.fromString("spring.eureka.server.v0"), name); | ||
|
||
// TODO | ||
// We have a template for the eureka server, consisting of a minimal Spring Boot application, as well as | ||
// pom.xml, configuration file, and a Dockerfile to build the image. We need to allow for the template properties | ||
// to be set by the user, such as the port, the name of the service, etc, and then we need to write these out | ||
// to a temporary location, and then build the image from that location. | ||
} | ||
|
||
@Override | ||
public List<TemplateFileOutput> processTemplate() { | ||
return List.of(); | ||
} | ||
|
||
@Override | ||
public EurekaServiceDiscovery self() { | ||
return this; | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
aspire4j/aspire4j-extensions-spring/src/main/resources/templates/eureka/Dockerfile
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,7 @@ | ||
FROM maven:3.9.7-eclipse-temurin-21 AS maven | ||
MAINTAINER microsoft.com | ||
COPY src eureka-service/src | ||
COPY pom.xml eureka-service/ | ||
RUN mvn package -f eureka-service/pom.xml | ||
RUN cp eureka-service/target/*.jar /eureka-service.jar | ||
ENTRYPOINT ["java","-jar","/eureka-service.jar"] |
54 changes: 54 additions & 0 deletions
54
aspire4j/aspire4j-extensions-spring/src/main/resources/templates/eureka/pom.xml
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,54 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>3.3.1</version> | ||
<relativePath/> <!-- lookup parent from repository --> | ||
</parent> | ||
|
||
<groupId>com.microsoft.aspire</groupId> | ||
<artifactId>eureka-server</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
|
||
<properties> | ||
<java.version>17</java.version> | ||
<spring-cloud.version>2023.0.2</spring-cloud.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-dependencies</artifactId> | ||
<version>${spring-cloud.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
13 changes: 13 additions & 0 deletions
13
...ates/eureka/src/main/java/com/microsoft/aspire/spring.eureka/EurekaServerApplication.java
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,13 @@ | ||
package com.microsoft.aspire.spring.eureka; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; | ||
|
||
@SpringBootApplication | ||
@EnableEurekaServer | ||
public class EurekaServerApplication { | ||
public static void main(String[] args) { | ||
SpringApplication.run(EurekaServerApplication.class, args); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...extensions-spring/src/main/resources/templates/eureka/src/main/resources/application.yaml
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,9 @@ | ||
spring: | ||
application: | ||
name: eureka-server | ||
server: | ||
port: 8761 | ||
eureka: | ||
client: | ||
register-with-eureka: false | ||
fetch-registry: false |
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
Oops, something went wrong.