3.dlc-admin部署
3.1. dlc-admin配置
3.1.1. 下载dlc-admin-xxx.zip
下载dlc源码,通过maven打包,会在target下生成dlc-admin-xxx.zip
3.1.2. 配置
将zip文件解压到指定部署机器,将config/dlc-default.xml中<value>127.0.0.1:47500..47509</value>替换成真实部署机器IP地址,如下配置中加了注释“用户可按需设置”均可修改
<!-- Config ignite client cache -->
<property name="cacheConfiguration">
<list>
<!-- Partitioned cache example configuration (Atomic mode). -->
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="dlcLogCache"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="backups" value="1"/>
<property name="evictionPolicy">
<bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
<!-- 设置缓存中需要储存的元素个数,用户可按需设置 -->
<constructor-arg value="1000"/>
</bean>
</property>
<property name="expiryPolicyFactory">
<bean class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
<constructor-arg>
<bean class="javax.cache.expiry.CreatedExpiryPolicy">
<constructor-arg>
<bean class="javax.cache.expiry.Duration">
<constructor-arg index="0">
<bean
class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
<property name="staticField"
value="java.util.concurrent.TimeUnit.MINUTES"/>
</bean>
</constructor-arg>
<!-- 设置缓存失效时间, 单位:分钟,用户可按需设置 -->
<constructor-arg index="1" value="2"/>
</bean>
</constructor-arg>
</bean>
</constructor-arg>
</bean>
</property>
</bean>
</list>
</property>
3.2. dlc-admin一键式部署
进入解压后的文件中,找到bin目录,启动start.sh脚本,启动信息如下:
2017-11-09 15:06:23.452 INFO 3696 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@7d58ae: startup date [Thu Nov 09 15:06:23 CST 2017]; root of context hierarchy
2017-11-09 15:06:24.645 INFO 3696 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$7b805f6a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
___ _ ___ _ ___ __ __ ___ _ _
| \| | / __|__ /_\ | \| \/ |_ _| \| |
| |) | |_| (_|___/ _ \| |) | |\/| || || .` |
|___/|____\___| /_/ \_\___/|_| |_|___|_|\_|
:: dlc-admin :: (v1.2.1.RELEASE)
2017-11-09 15:06:26.472 INFO 3696 --- [ main] com.happygo.dlc.api.DlcWebApplication : No active profile set, falling back to default profiles: default
2017-11-09 15:06:26.519 INFO 3696 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@502ac9: startup date [Thu Nov 09 15:06:26 CST 2017]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@7d58ae