Skip to content

Commit

Permalink
Partial-Bug: #1632076 - Default Monitoring - no need to install Monit…
Browse files Browse the repository at this point in the history
…oring pkg

The files are brought in automatically with SM package and set to default true in SM
Set as default false in SM lite

Patch:
Partial-Bug: #1634275  - Any py file in src/ is copied to /opt/contrail/sm for SM lite
No need to make individual check-ins for SM or SM lite for new files in src/

In upgrade, since SM Mon package is no longer installed, we can delete

Change-Id: I82406a0b3272d1debacc41045ef8b2295c0e5093
  • Loading branch information
nitishkrishna committed Nov 1, 2016
1 parent 440f67b commit 72f3e1a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 38 deletions.
21 changes: 2 additions & 19 deletions build/deb_server_manager_setup.sh
Expand Up @@ -18,8 +18,6 @@ SM=""
SMCLIENT=""
SMCLIFFCLIENT=""
HOSTIP=""
SMMON=""
NOSMMON=""
WEBUI=""
NOWEBUI=""
WEBCORE=""
Expand All @@ -39,12 +37,10 @@ function usage()
echo "-h --help"
echo "--smlite"
echo "--nowebui"
echo "--nosm-mon"
echo "--sm"
echo "--sm-client"
echo "--sm-cliff-client"
echo "--webui"
echo "--sm-mon"
echo "--hostip=<HOSTIP>"
echo "--cert-name=<PUPPET CERTIFICATE NAME>"
echo "--all"
Expand Down Expand Up @@ -194,27 +190,20 @@ while [ "$1" != "" ]; do
WEBCORE="contrail-web-core"
SMCLIENT="contrail-server-manager-client"
SMCLIFFCLIENT="contrail-server-manager-cliff-client"
SMMON="contrail-server-manager-monitoring"
;;
--smlite)
SMLITE="smlite"
;;
--nowebui)
NOWEBUI="nowebui"
;;
--nosm-mon)
NOSMMON="nosm-mon"
;;
--sm)
SM="contrail-server-manager"
;;
--webui)
WEBUI="contrail-web-server-manager"
WEBCORE="contrail-web-core"
;;
--sm-mon)
SMMON="contrail-server-manager-monitoring"
;;
--sm-client)
SMCLIENT="contrail-server-manager-client"
;;
Expand Down Expand Up @@ -311,6 +300,7 @@ if [ "$SM" != "" ]; then
RESTART_SERVER_MANAGER="1"
if [ "$SMLITE" != "" ]; then
echo "$space$arrow$install_str Server Manager Lite"
dpkg -P --force-all contrail-server-manager-monitoring >> $log_file 2>&1
apt-get -y install contrail-server-manager-lite >> $log_file 2>&1
apt-get -y install -f >> $log_file 2>&1
else
Expand All @@ -325,6 +315,7 @@ if [ "$SM" != "" ]; then
fi
echo "$space$arrow$install_str Server Manager"
apt-get -y install cobbler="2.6.3-1" >> $log_file 2>&1 # TODO : Remove after local repo pinning
dpkg -P --force-all contrail-server-manager-monitoring >> $log_file 2>&1
apt-get -y install contrail-server-manager >> $log_file 2>&1
apt-get -y install -f >> $log_file 2>&1
# Stopping webui service that uses old name
Expand Down Expand Up @@ -378,14 +369,6 @@ if [ "$WEBUI" != "" ] && [ "$NOWEBUI" == "" ]; then
echo "$arrow Completed Installing Web Server Manager"
fi

if [ "$SMMON" != "" ] && [ "$NOSMMON" == "" ]; then
echo "$arrow Server Manager Monitoring"
echo "$space$arrow$install_str Server Manager Monitoring"
apt-get -y install contrail-server-manager-monitoring >> $log_file 2>&1
apt-get -y install -f >> $log_file 2>&1
echo "$arrow Completed Installing Server Manager Monitoring"
fi

if [ "x$RESTART_SERVER_MANAGER" == "x1" ]; then
if [ "$SMLITE" != "" ]; then
echo "$space$space$arrow Starting Server Manager Lite Service"
Expand Down
2 changes: 1 addition & 1 deletion common/debian/contrail-server-manager-lite/debian/control
Expand Up @@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 8)
Package: contrail-server-manager-lite
Architecture: all
Maintainer: tsurendra <tsurendra@juniper.net>
Depends: python, apache2, sqlite, puppetmaster-passenger (=3.7.3-1puppetlabs1), puppetmaster-common (=3.7.3-1puppetlabs1), xinetd, python-pip, python-gevent, ntp,autoconf, gcc, tftp, sendmail, dpkg-dev, syslinux, ipmitool, createrepo, libapache2-mod-wsgi, python-urlgrabber, python-django, selinux-utils, python-simplejson, python-dev, fence-agents, python-requests, reprepro, python-netaddr, python-yaml, libnss3-1d, python-paramiko, python-xmltodict, python-pycurl, python-crypto
Depends: python, apache2, sqlite, puppetmaster-passenger (=3.7.3-1puppetlabs1), puppetmaster-common (=3.7.3-1puppetlabs1), xinetd, python-pip, python-gevent, ntp,autoconf, gcc, tftp, sendmail, dpkg-dev, syslinux, ipmitool, createrepo, libapache2-mod-wsgi, python-urlgrabber, python-django, selinux-utils, python-simplejson, python-dev, fence-agents, python-requests, reprepro, python-netaddr, python-yaml, libnss3-1d, python-paramiko, python-xmltodict, python-pycurl, python-crypto, python-contrail
Section: contrail-server-manager-lite
Priority: extra
Description: Contrail Server Manager - Server Package, without cobbler, only provisioning supported package.
1 change: 1 addition & 0 deletions common/debian/contrail-server-manager-lite/debian/postinst
Expand Up @@ -45,6 +45,7 @@ update-rc.d contrail-server-manager defaults

# Set IP address in server manager configuration file.
sed -i "s/__\$IPADDRESS__/$HOST_IP/g" /opt/contrail/server_manager/sm-config.ini
sed -i "s/127.0.0.1/$HOST_IP/g" /opt/contrail/server_manager/sm-config.ini
# Set IP Address in smgr_dhcp_event.py DHCP hook.
sed -i "s/__\$IPADDRESS__/$HOST_IP/g" /opt/contrail/server_manager/smgr_dhcp_event.py

Expand Down
18 changes: 1 addition & 17 deletions common/debian/contrail-server-manager-lite/debian/rules
Expand Up @@ -94,24 +94,8 @@ override_dh_auto_install:
install -p -m 755 $(src_path)/reprepro/conf/override $(build_root)/opt/contrail/server_manager/reprepro/conf/override
install -p -m 755 $(src_path)/reprepro/dpdk_depends_conf/distributions $(build_root)/opt/contrail/server_manager/reprepro/dpdk_depends_conf/distributions
install -p -m 755 $(src_path)/reprepro/dpdk_depends_conf/override $(build_root)/opt/contrail/server_manager/reprepro/dpdk_depends_conf/override
cp -r $(src_path)/server_mgr_main.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_db.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_utils.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_cobbler.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_status.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_puppet.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_exception.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_logger.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_err.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/smgr_dhcp_event.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/contrail_defaults.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_defaults.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/*.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/vmware/esxi_contrailvm.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_mon_base_plugin.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_ssh_client.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_validations.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_certs.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/server_mgr_cert_utils.py $(build_root)/opt/contrail/server_manager/
cp -r $(src_path)/role_sequence.json $(build_root)/etc/contrail_smgr/
cp -r $(src_path)/contrail-defaults.yaml $(build_root)/etc/contrail_smgr/
cp -r $(src_path)/create_vm.py $(build_root)/opt/contrail/server_manager/
Expand Down
2 changes: 1 addition & 1 deletion common/debian/contrail-server-manager/debian/control
Expand Up @@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 8)
Package: contrail-server-manager
Architecture: all
Maintainer: tsurendra <tsurendra@juniper.net>
Depends: python , apache2, sqlite, cobbler (=2.6.3-1), puppetmaster-passenger (=3.7.3-1puppetlabs1), puppetmaster-common (=3.7.3-1puppetlabs1), xinetd, python-pip, python-gevent, dhcp3-server, ntp,autoconf, gcc, bind9, tftp, sendmail, dpkg-dev, syslinux, ipmitool, createrepo, libapache2-mod-wsgi, tftpd-hpa, python-urlgrabber, python-django, selinux-utils, python-simplejson, python-dev, fence-agents, python-requests, reprepro, python-netaddr
Depends: python , apache2, sqlite, cobbler (=2.6.3-1), puppetmaster-passenger (=3.7.3-1puppetlabs1), puppetmaster-common (=3.7.3-1puppetlabs1), xinetd, python-pip, python-gevent, dhcp3-server, ntp,autoconf, gcc, bind9, tftp, sendmail, dpkg-dev, syslinux, ipmitool, createrepo, libapache2-mod-wsgi, tftpd-hpa, python-urlgrabber, python-django, selinux-utils, python-simplejson, python-dev, fence-agents, python-requests, reprepro, python-netaddr, python-contrail
Section: contrail-server-manager
Priority: extra
Description: Contrail Server Manager - Server Package
3 changes: 3 additions & 0 deletions common/debian/contrail-server-manager/debian/postinst
Expand Up @@ -135,6 +135,9 @@ a2enmod mpm_worker
update-rc.d contrail-server-manager defaults
# Set IP address in server manager configuration file.
sed -i "s/__\$IPADDRESS__/$HOST_IP/g" /opt/contrail/server_manager/sm-config.ini
sed -i "s/127.0.0.1/$HOST_IP/g" /opt/contrail/server_manager/sm-config.ini
# Set monitoring true as default
sed -i "s/monitoring * = .*/monitoring = true/g"
# Set IP Address in smgr_dhcp_event.py DHCP hook.
sed -i "s/__\$IPADDRESS__/$HOST_IP/g" /opt/contrail/server_manager/smgr_dhcp_event.py
sed -i "s/cobbler_username = cobbler/cobbler_username = testing/g" /opt/contrail/server_manager/sm-config.ini
Expand Down

0 comments on commit 72f3e1a

Please sign in to comment.