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
INSERT INTO future_jobs (ID,task_id,hash_key,start_time,expire_time,name,future_job_status,application,path,method,payload,created_date,last_modified_date,url) | |
VALUES (nextval('seq_future_jobs'),'sample-future-job','sample-future-job-hash-key',NOW() + INTERVAL '5 minutes',NOW() + INTERVAL '10 minutes','Sample Future Job','WAITING','test-application','/future-job/invoke','GET','',now(),now(),'http://localhost:6060'); |
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
<dependency> | |
<groupId>org.springframework.cloud</groupId> | |
<artifactId>spring-cloud-config-server</artifactId> | |
<version>2.2.0.RELEASE</version> | |
</dependency> | |
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-security</artifactId> | |
<version>2.2.2.RELEASE</version> | |
</dependency> |
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
@SpringBootApplication | |
@EnableConfigServer | |
public class ConfigServer { | |
public static void main(String[] arguments) { | |
SpringApplication.run(ConfigServer.class, arguments); | |
} | |
} |
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
$> git init | |
$> echo 'user.role=Developer' > config-client-development.properties | |
$> echo 'user.role=User' > config-client-production.properties | |
$> git add . | |
$> git commit -m 'Initial config-client properties' |
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
spring.application.name=config-client | |
spring.profiles.active=development | |
spring.cloud.config.uri=http://localhost:8888 | |
spring.cloud.config.username=root | |
spring.cloud.config.password=s3cr3t |
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
@SpringBootApplication | |
@RestController | |
public class ConfigClient { | |
@Value("${user.role}") | |
private String role; | |
public static void main(String[] args) { | |
SpringApplication.run(ConfigClient.class, args); | |
} |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: ${CI_PROJECT_NAME}-config | |
namespace: mpc | |
data: | |
config.sample.url: 'http://sample-url.com' |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: ${CI_PROJECT_NAME}-deployment | |
namespace: mpc | |
spec: | |
replicas: ${REPLICA} | |
template: | |
spec: | |
containers: |
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
<dependency> | |
<groupId>org.springframework.cloud</groupId> | |
<artifactId>spring-cloud-starter-config</artifactId> | |
<version>2.2.0.RELEASE</version> | |
</dependency> | |
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-web</artifactId> | |
<version>2.2.2.RELEASE</version> | |
</dependency> |
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
server.port=8888 | |
spring.cloud.config.server.git.uri=ssh://localhost/config-repo | |
spring.cloud.config.server.git.clone-on-start=true | |
spring.security.user.name=root | |
spring.security.user.password=s3cr3t |