Skip to content

Configuration Management Tool

shmurthy62 edited this page Feb 11, 2015 · 2 revisions

Introduction

It's the web tool that manages the JetStream application configuration beans. It stores spring config beans in Mongo DB. When user modify the config bean, the tool will publish the notification to zookeeper, the corresponding JetStream applications will be got notified and change the config dynamically. it supports batch creating beans from file and it could also display the data flows of application as well.

How to Build, deploy

1. It's a JetStream application, so just go through the same build and deploy process as normal Jetstream application.
    a. in start.sh, replace the {staging_mongo}, {preprod_mongo} and {prod_mongo} with your mongos.
    b. apply for the pool.
    c. in deploy.sh, replace the {app_id} with your application id.
2. Please make sure it shares the same ZK as other applications.

How to use it

1. Login with "admin/admin"
2. Create your app settings by click "can't find your app name?" link. Input the app name which can be found in your application console http://host:port/Application?$format=help. 
3. You could create a single bean or you can import multiple beans from a file. Click the "Create" or "Import from file" button". Please choose DC or LOCAL scope if your beans are DC or LOCAL specific.
4. Choose your app and beans, then you can do batch validation/delete/update.
5. If you update the bean, click "Push to Mongo", it will update the bean in Mongo and send the notifications to ZK, then all the relevant nodes will get the notifications.

How to set it up locally?

Check out the code, it's on top of JetStream container, so you should input the port number and set the env parameters below.

  1. JETSTREAM_HOME = {parent directory}/buildsrc.
  2. MONGO_HOME = {your mongo url}, the example is: mongo://localhost:27017/jetstreamconfig.
  3. WEB_HOME = {parent directory}/src/main/webapp.
  4. add "-Dspring.profiles.active=dev" in VM arguments.
  5. start zookeeper first.
  6. Verify that the context Rtbd.Local is bound to zookeeper transport. It uses that context to send config change notifications.
Clone this wiki locally