coolbeevip opened a new pull request #395: [SCB 1127] Support alpha server 
registering to Spring Cloud Eureka
URL: https://github.com/apache/servicecomb-pack/pull/395
 
 
   ### Build Alpha Server with Spring Cloud
   spring-boot 1.x
   > spring-cloud-netflix-eureka-client-1.4.6.RELEASE.jar and dependencies will 
be added to alpha-server-0.4.0-SNAPSHOT-exec.jar
   ```shell
   mvn clean package -DskipTests=true -Pspring-cloud,spring-boot-1
   ```
   spring-boot 2.x
   > spring-cloud-netflix-eureka-client-2.0.2.RELEASE.jar  and dependencies 
will be added to alpha-server-0.4.0-SNAPSHOT-exec.jar
   ```shell
   mvn clean package -DskipTests=true -Pspring-cloud,spring-boot-2
   ```
   ### Run Alpha Server
   ```shell
   java -jar alpha-server-0.4.0-SNAPSHOT-exec.jar \
     --spring.datasource.platform=mysql \
     --spring.datasource.dataSourceClassName=com.mysql.jdbc.Driver \
     
--spring.datasource.url="jdbc:mysql://127.0.0.1:3306/saga?useUnicode=true&characterEncoding=utf-8&autoReconnect=TRUE"
 \
     --spring.datasource.username=saga-user \
     --spring.datasource.password=saga-password
   ```
   Key information in the log file
   ```
   [main] INFO  
org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry 
- Registering application SERVICECOMB-ALPHA-SERVER with eureka with status UP
   ```
   ### Get Alpha Server info with Eureka
   ```
   curl http://127.0.0.1:8761/eureka/apps/
   ```
   output
   ```
   <applications>
     <versions__delta>1</versions__delta>
     <apps__hashcode>UP_1_</apps__hashcode>
     <application>
       <name>SERVICECOMB-ALPHA-SERVER</name>
       <instance>
         <instanceId>10.50.7.15::servicecomb-alpha-server:8090</instanceId>
         <hostName>0.0.0.0</hostName>
         <app>SERVICECOMB-ALPHA-SERVER</app>
         <ipAddr>0.0.0.0</ipAddr>
         <status>UP</status>
         <overriddenstatus>UNKNOWN</overriddenstatus>
         <port enabled="true">8090</port>
         <securePort enabled="false">443</securePort>
         <countryId>1</countryId>
         <dataCenterInfo 
class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo">
           <name>MyOwn</name>
         </dataCenterInfo>
         <leaseInfo>
           <renewalIntervalInSecs>30</renewalIntervalInSecs>
           <durationInSecs>90</durationInSecs>
           <registrationTimestamp>1548214185871</registrationTimestamp>
           <lastRenewalTimestamp>1548214185871</lastRenewalTimestamp>
           <evictionTimestamp>0</evictionTimestamp>
           <serviceUpTimestamp>1548214185871</serviceUpTimestamp>
         </leaseInfo>
         <metadata>
           <management.port>8090</management.port>
           <servicecomb-alpha-server>0.0.0.0:8080</servicecomb-alpha-server>
         </metadata>
         <homePageUrl>http://0.0.0.0:8090</homePageUrl>
         <statusPageUrl>http://0.0.0.0:8090/info</statusPageUrl>
         <healthCheckUrl>http://0.0.0.0:8090/health</healthCheckUrl>
         <vipAddress>servicecomb-alpha-server</vipAddress>
         <secureVipAddress>servicecomb-alpha-server</secureVipAddress>
         <isCoordinatingDiscoveryServer>false</isCoordinatingDiscoveryServer>
         <lastUpdatedTimestamp>1548214185871</lastUpdatedTimestamp>
         <lastDirtyTimestamp>1548214185716</lastDirtyTimestamp>
         <actionType>ADDED</actionType>
       </instance>
     </application>
   </applications>
   ```
   
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
    - [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line 
and body.
    - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
    - [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
    - [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to