20 from settings
import SERVICES_TMP, BASIC_IMAGE, SSH_KEY, SYSTEM_VERSION, DEB_REPO
23 cm_net_clm_cm, cm_net_cm_cluster, clm_net_clm_cm, rm
26 cm_config = open(
'%s/cm.config.diff' % SERVICES_TMP,
'w')
27 cm_config.write(
'''18c18
28 < LOG_LEVEL = logging.ERROR
30 > LOG_LEVEL = logging.INFO
32 < CM_ADDRESS = ('127.0.0.1', 8001)
34 > CM_ADDRESS = ('%(CM_NET_CLM_CM)s', 8001)
36 < RMI_ADDRESS = ('127.0.0.1', 8003)
38 > RMI_ADDRESS = ('%(CM_NET_CM_CLUSTER)s', 8003)
40 < CLM_ADDRESS = ('127.0.0.1', 8000)
42 > CLM_ADDRESS = ('%(CLM_NET_CLM_CM)s', 8000)
44 < RM_ADDRESS = ('127.0.0.1', 8004)
46 > RM_ADDRESS = ('%(RM)s', 8004)
48 < VNC_ADDRESS = '127.0.0.1'
50 > VNC_ADDRESS = '%(RM)s'
51 ''' % {
'CM_NET_CLM_CM': cm_net_clm_cm,
52 'CM_NET_CM_CLUSTER': cm_net_cm_cluster,
53 'CLM_NET_CLM_CM': clm_net_clm_cm,
60 actions.append({
'type':
'exec',
63 '%s/id_test' % SERVICES_TMP,
64 '%s/cm.config.diff' % SERVICES_TMP,
65 'root@%s:/tmp/' % cm_net_clm_cm]})
66 actions.append({
'type':
'exec',
69 '%s/id_test' % SERVICES_TMP,
70 'root@%s' % cm_net_clm_cm,
71 'patch /etc/cc1/cm/settings.py < /tmp/cm.config.diff']})
72 actions.append({
'type':
'exec',
75 '%s/id_test' % SERVICES_TMP,
76 'root@%s' % cm_net_clm_cm,
77 '/etc/init.d/cc1-cm restart']})