testing config service
This commit is contained in:
		
							
								
								
									
										24
									
								
								Jenkinsfile-PROD
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								Jenkinsfile-PROD
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
				
			|||||||
 | 
					pipeline {
 | 
				
			||||||
 | 
					    agent any
 | 
				
			||||||
 | 
					    tools {
 | 
				
			||||||
 | 
					        maven "Maven 3.6.3"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    stages {
 | 
				
			||||||
 | 
					      stage('Build') {
 | 
				
			||||||
 | 
					              steps {
 | 
				
			||||||
 | 
					                 sh "docker-compose -f docker-compose-PROD --context PROD build"
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        stage('Deploy') {
 | 
				
			||||||
 | 
					            steps {
 | 
				
			||||||
 | 
					                sh "docker-compose -f docker-compose-PROD --context PROD up -d"
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        stage('Logs') {
 | 
				
			||||||
 | 
					            steps {
 | 
				
			||||||
 | 
					        		sleep time: 1, unit: 'MINUTES'
 | 
				
			||||||
 | 
					        		sh 'docker -f docker-compose-PROD --context PROD logs klaus'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										21
									
								
								docker-compose-PROD.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								docker-compose-PROD.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					version: '3'
 | 
				
			||||||
 | 
					services:
 | 
				
			||||||
 | 
					  redis:
 | 
				
			||||||
 | 
					    image: 'redis'
 | 
				
			||||||
 | 
					    restart: "no"
 | 
				
			||||||
 | 
					  klaus:
 | 
				
			||||||
 | 
					    build:
 | 
				
			||||||
 | 
					      context: .
 | 
				
			||||||
 | 
					      dockerfile: Dockerfile
 | 
				
			||||||
 | 
					    container_name: klaus
 | 
				
			||||||
 | 
					    restart: "no"
 | 
				
			||||||
 | 
					    ports:
 | 
				
			||||||
 | 
					      - "8097:8097"
 | 
				
			||||||
 | 
					    depends_on:
 | 
				
			||||||
 | 
					      - redis
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      SPRING_PROFILES_ACTIVE: PROD
 | 
				
			||||||
 | 
					networks:
 | 
				
			||||||
 | 
					  default:
 | 
				
			||||||
 | 
					    external:
 | 
				
			||||||
 | 
					      name: shared_network_mocked_services
 | 
				
			||||||
@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					package com.release11.klaus.config;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 | 
				
			||||||
 | 
					import org.springframework.context.annotation.Configuration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Configuration
 | 
				
			||||||
 | 
					@EnableDiscoveryClient
 | 
				
			||||||
 | 
					public class LocalDiscovery {
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										23
									
								
								src/main/resources/bootstrap-PROD.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/main/resources/bootstrap-PROD.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					spring:
 | 
				
			||||||
 | 
					  application:
 | 
				
			||||||
 | 
					    name: klaus
 | 
				
			||||||
 | 
					  cloud:
 | 
				
			||||||
 | 
					    spring:
 | 
				
			||||||
 | 
					      cloud:
 | 
				
			||||||
 | 
					        config:
 | 
				
			||||||
 | 
					          fail-fast: false
 | 
				
			||||||
 | 
					          uri: http://s5000xvn.zipper.release11.com:8888
 | 
				
			||||||
 | 
					          retry:
 | 
				
			||||||
 | 
					            max-attempts: 20
 | 
				
			||||||
 | 
					            max-interval: 15000
 | 
				
			||||||
 | 
					            initial-interval: 10000
 | 
				
			||||||
 | 
					server:
 | 
				
			||||||
 | 
					  port: 8097
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					eureka:
 | 
				
			||||||
 | 
					  client:
 | 
				
			||||||
 | 
					    enabled: true
 | 
				
			||||||
 | 
					    register-with-eureka: true
 | 
				
			||||||
 | 
					    fetch-registry: true
 | 
				
			||||||
 | 
					    serviceUrl:
 | 
				
			||||||
 | 
					      defaultZone: http://netflix:eureka@eureka:8761/eureka
 | 
				
			||||||
							
								
								
									
										23
									
								
								src/main/resources/bootstrap.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/main/resources/bootstrap.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					spring:
 | 
				
			||||||
 | 
					  application:
 | 
				
			||||||
 | 
					    name: klaus
 | 
				
			||||||
 | 
					  cloud:
 | 
				
			||||||
 | 
					    spring:
 | 
				
			||||||
 | 
					      cloud:
 | 
				
			||||||
 | 
					        config:
 | 
				
			||||||
 | 
					          fail-fast: false
 | 
				
			||||||
 | 
					          uri: http://s5000xvn.zipper.release11.com:8888
 | 
				
			||||||
 | 
					          retry:
 | 
				
			||||||
 | 
					            max-attempts: 20
 | 
				
			||||||
 | 
					            max-interval: 15000
 | 
				
			||||||
 | 
					            initial-interval: 10000
 | 
				
			||||||
 | 
					server:
 | 
				
			||||||
 | 
					  port: 8097
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					eureka:
 | 
				
			||||||
 | 
					  client:
 | 
				
			||||||
 | 
					    enabled: true
 | 
				
			||||||
 | 
					    register-with-eureka: true
 | 
				
			||||||
 | 
					    fetch-registry: true
 | 
				
			||||||
 | 
					    serviceUrl:
 | 
				
			||||||
 | 
					      defaultZone: http://netflix:eureka@eureka:8761/eureka
 | 
				
			||||||
							
								
								
									
										10
									
								
								target/classes/application-DEV.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								target/classes/application-DEV.properties
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					#environment:
 | 
				
			||||||
 | 
					server.port = 8097
 | 
				
			||||||
 | 
					spring.application.name = klaus
 | 
				
			||||||
 | 
					eureka.client.service-url.defaultZone=http://netflix:eureka@eureka:8761/eureka/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#logging:
 | 
				
			||||||
 | 
					spring.output.ansi.enabled = always
 | 
				
			||||||
 | 
					logging.level.root=DEBUG
 | 
				
			||||||
 | 
					logging.level.org.springframework.web=DEBUG
 | 
				
			||||||
 | 
					logging.level.com.release11=DEBUG
 | 
				
			||||||
							
								
								
									
										10
									
								
								target/classes/application-PROD.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								target/classes/application-PROD.properties
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					#environment:
 | 
				
			||||||
 | 
					server.port = 8097
 | 
				
			||||||
 | 
					spring.application.name = klaus
 | 
				
			||||||
 | 
					eureka.client.service-url.defaultZone=http://netflix:eureka@eureka:8761/eureka/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#logging:
 | 
				
			||||||
 | 
					spring.output.ansi.enabled = always
 | 
				
			||||||
 | 
					logging.level.root=INFO
 | 
				
			||||||
 | 
					logging.level.org.springframework.web=INFO
 | 
				
			||||||
 | 
					logging.level.com.release11=INFO
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								target/classes/com/release11/klaus/config/LocalDiscovery.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/com/release11/klaus/config/LocalDiscovery.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user