cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murali Reddy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-5879) Document on how to use RabbitMq event bus with spring modularisation done in 4.3, also document how to use encrypted password in the config file
Date Mon, 11 Aug 2014 09:30:12 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-5879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092609#comment-14092609
] 

Murali Reddy commented on CLOUDSTACK-5879:
------------------------------------------

Below notes need to be incorporated into the cloudstack documentation. Documentation we have
(http://cloudstack-administration.readthedocs.org/en/latest/events.html) works only with 4.2,
from 4.3 due to spring modularisation we need to follow below steps. Please include below
notes in the cloudstack guides.

==============================================================================================


Create a file 'spring-event-bus-context.xml'  at  "/etc/cloudstack/management/META-INF/cloudstack/core/".
If the path does not exist please create the folders as required.

add below contents in spring-event-bus-context.xml file.

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                                                    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                                                    http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
                                                    http://www.springframework.org/schema/context
                                                    http://www.springframework.org/schema/context/spring-context-3.0.xsd"
        >

    <bean id="eventNotificationBus" class="org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus">
        <property name="name" value="eventNotificationBus"/>
        <property name="server" value="10.146.0.128"/>
        <property name="port" value="55672"/>
        <property name="username" value="guest"/>
        <property name="password" value="guest"/>
        <property name="exchange" value="cloudstack-events"/>
      </bean>
  </beans>
==============================================================================================

As you can see in the previous steps username and password are in plain text. if in the deployment
if users want to have the username & password need to be encrypted following instruction
needs to be followed. Please add below notes in the docs.
==============================================================================================
Add the below contents in to spring-event-bus-context.xml'

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                                                    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                                                    http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
                                                    http://www.springframework.org/schema/context
                                                    http://www.springframework.org/schema/context/spring-context-3.0.xsd"
        >

    <bean id="eventNotificationBus" class="org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus">
        <property name="name" value="eventNotificationBus"/>
        <property name="server" value="10.146.0.128"/>
        <property name="port" value="55672"/>
        <property name="username" value="${username}"/>
        <property name="password" value="password" value="${password}"/>
        <property name="exchange" value="cloudstack-events"/>
      </bean>

   <bean id="environmentVariablesConfiguration" class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
       <property name="algorithm" value="PBEWithMD5AndDES" />
       <property name="passwordEnvName" value="APP_ENCRYPTION_PASSWORD" />
   </bean>

    <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
        <property name="config" ref="environmentVariablesConfiguration" />
    </bean>

<bean id="propertyConfigurer" class="org.jasypt.spring3.properties.EncryptablePropertyPlaceholderConfigurer">
    <constructor-arg ref="configurationEncryptor" />
    <property name="location" value="classpath:/cred.properties" />
</bean>

  </beans>

and then create cred.properties file as below in the classpath, where the value specified
for username and password are the jasypt encrypted strings for plaint text string for the
username and password.

username=nh2XrM7jWHMG4VQK18iiBQ==
password=nh2XrM7jWHMG4VQK18iiBQ==

==============================================================================================




> Document on how to use RabbitMq event bus with spring modularisation done in 4.3, also
document how to use encrypted password in the config file
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-5879
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5879
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Doc
>    Affects Versions: 4.3.0
>            Reporter: Murali Reddy
>            Assignee: Murali Reddy
>             Fix For: 4.5.0
>
>
> Document on how to use RabbitMq event bus with spring modularisation done in 4.3, also
document how to use encrypted password in the config file.
> From 4.3 RabbitMq event bus plug-in configuration need to be specified differently (in
4.2 and 4.1 it was specified in componenetConext file) in separate file. This doc bug is to
get the necessary details required for 4.3



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message