zenoss core beta_installation_guide_r5.0.0b2_d99.14.253

23
Zenoss Core Beta Installation Guide Release 5.0.0b2 Zenoss, Inc. www.zenoss.com

Upload: sachin-jaypatre

Post on 14-Aug-2015

41 views

Category:

Documents


3 download

TRANSCRIPT

Zenoss Core BetaInstallation Guide

Release 5.0.0b2

Zenoss, Inc.

www.zenoss.com

2

Zenoss Core Beta Installation Guide

Copyright © 2014 Zenoss, Inc. All rights reserved.

Zenoss and the Zenoss logo are trademarks or registered trademarks of Zenoss, Inc., in the United States and other countries. All other trademarks, logos,and service marks are the property of Zenoss or other third parties. Use of these marks is prohibited without the express written consent of Zenoss, Inc., orthe third-party owner.

Flash is a registered trademark of Adobe Systems Incorporated.

Oracle, the Oracle logo, Java, and MySQL are registered trademarks of the Oracle Corporation and/or its affiliates.

Linux is a registered trademark of Linus Torvalds.

RabbitMQ is a trademark of VMware, Inc.

SNMP Informant is a trademark of Garth K. Williams (Informant Systems, Inc.).

Sybase is a registered trademark of Sybase, Inc.

Tomcat is a trademark of the Apache Software Foundation.

VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions.

Windows is a registered trademark of Microsoft Corporation in the United States and other countries.

All other companies and products mentioned are trademarks and property of their respective owners.

Part Number: 09.14.253

Zenoss, Inc.11305 Four Points DriveBldg 1 - Suite 300Austin, Texas 78726

Zenoss, Inc. 3

ContentsPreface.................................................................................................................................. 4

Chapter 1: Installing Zenoss Control Center.................................................. 5Master host requirements................................................................................................................................................ 5Preparing to install............................................................................................................................................................ 5Installing Zenoss Core..................................................................................................................................................... 6Enabling client access.......................................................................................................................................................7Zenoss Core browser interfaces.....................................................................................................................................8Starting Zenoss Core........................................................................................................................................................9

Chapter 2: Installing resource pool hosts......................................................11Resource pool host requirements.................................................................................................................................11Installing Zenoss Core................................................................................................................................................... 11

Appendix A: Installing an appliance virtual machine.................................. 14Importing an appliance with VMware Player or VMware Workstation................................................................ 14Enabling client access.....................................................................................................................................................15Zenoss Core browser interfaces...................................................................................................................................15Starting Zenoss Core......................................................................................................................................................16

Appendix B: Maintenance tasks................................................................... 19Installing a ZenPack....................................................................................................................................................... 19Reducing high load averages on AWS hosts..............................................................................................................19Converting a single-host deployment to multi-host................................................................................................. 20Deploying multiple instances of a service..................................................................................................................21Configuring Zenoss Control Center............................................................................................................................21

Zenoss Core Beta Installation Guide

4 Zenoss, Inc.

PrefaceThis beta software installation guide provides

■ an introduction to the primary feature of this release, Zenoss Control Center■ instructions for installing and using Zenoss Control Center

Supported client and browser combinations

The table in this section identifies the web browsers and client operating systems that are supported for this release.

Note All browsers must have Adobe® Flash® Player 11 (or a more recent version) installed.

Client OS Supported Browsers

Internet Explorer 10

Firefox 30.0

Windows 7

Chrome 35

Windows 8.1 Internet Explorer 11

Firefox 30.0OS X Mavericks (10.9)

Chrome 35

Firefox 30.0Ubuntu 14.04 LTS

Chrome 35

Firefox 30.0Ubuntu 12.04 LTS

Chrome 35

Additional information

If you have technical questions about this software, contact your Zenoss Product Marketing representative.

Note Zenoss Support does not provide assistance for beta software.

Installing Zenoss Control Center

Zenoss, Inc. 5

Installing Zenoss Control Center 1This release introduces Zenoss Control Center, a Platform-as-a-Service (PaaS) management system for services.Zenoss Control Center is based on Docker, and greatly improves the speed and flexibility of deploying Zenoss Core.

You may install Zenoss Control Center in a single-host or multi-host configuration. For both configurations, thefirst step is to install Zenoss Control Center on a master host. The architecture of Zenoss Control Center allows themaster host to change as needed, but the first host on which Zenoss Control Center is installed is the default masterhost.

A multi-host configuration includes one or more resource pools. A typical production deployment of ZenossControl Center includes a pool of hosts, for the stateful services of Zenoss Core—databases, zenhub, and so on—and one or more additional pools of hosts, for stateless services (collectors).

Master host requirementsZenoss Control Center requires a real or virtual machine with the following features for its master host.

Note An under-resourced master host will not function properly. Choose the recommended values wheneverpossible, and avoid any attempt to evaluate this release on a machine that does not meet the minimum requirements.

■ 4 CPUs minimum (64-bit only)■ 16GB RAM minimum■ 40GB local storage (network file systems not supported)■ Ubuntu Linux 14.04, server or desktop (64-bit version)

The following capabilities or information are required to install Zenoss Control Center on a master host.

■ A user account with sudo privileges.

Note The installation commands are written for the bash shell.

■ Public internet access.■ The public (primary) IPv4 address of the master host, in dot-decimal notation.■ Note If you are using an Amazon Web Services host, add its hostname and IP address to /etc/hosts.

Preparing to installFollow this procedure to prepare a Zenoss Control Center master or resource pool host.

Zenoss Core Beta Installation Guide

6 Zenoss, Inc.

1 Log in to the target host (the master or resource pool host) as a user with sudo privileges.2 Verify the host supports the 64-bit architecture.

uname -m

■ If the output is x86_64, the architecture is 64-bit. Proceed to the next step■ If the output is i386/i486/i586/i686, the architecture is 32-bit. Stop this procedure and select a

different host.3 Install Docker.

wget -O - http://get.docker.io | sh4 Add the current user account to the docker group.

sudo usermod -aG docker $USER5 Install the Zenoss OpenPGP public key.

sudo apt-key adv --keyserver keys.gnupg.net --recv-keys AA5A1AD76 Add the Zenoss repository to the list of repositories.

sudo sh -c 'echo \ "deb [ arch=amd64 ] http://get.zenoss.io/apt/ubuntu trusty universe" \ > /etc/apt/sources.list.d/zenoss.list'

7 Update the Ubuntu repository database.sudo apt-get update

8 If you are setting up a multi-host deployment, install the NTP package and start ntpd.sudo apt-get install -y ntp

9 Log out.This step ensures the current user has docker privileges for subsequent commands.

Installing Zenoss CoreFollow this procedure to install Zenoss Core on a master or resource pool host.

1 Log in to the target host (master or resource pool host) as a user with sudo and docker privileges.2 Install the Zenoss Core service template.

sudo apt-get install -y zenoss-core-service3 Configure the Zenoss Control Center daemon to restart upon reboot.

S1='start on (filesystem and started docker and 'S2='(started network-interface or started 'S3='network-manager or started networking) )'NEW="\n${S1}${S2}${S3}"sudo sed -i -e 's|^\(start on.*\)$|#\1|' \ -e '/^#start on/ s|$|'"${NEW}"'|' \ /etc/init/serviced.conf

4 Optional: Configure the target host for multi-host deployment, if necessary.

The /etc/default/serviced file contains variables that define the character of an instance of ZenossControl Center. Its defaults configure the master host for single-host deployment. For more information aboutserviced configuration options, see Configuring Zenoss Control Center on page 21.

Note Do not edit /etc/default/serviced for a single-host deployment.

■ To configure the target host as the master host, edit the /etc/default/serviced file with thefollowing command.

sudo sed -i -e 's|^# *\(export HOME=/root\)|\1|' \ -e 's|^# *\(export SERVICED_REGISTRY=\).|\11|' \ -e 's|^# *\(export SERVICED_AGENT=\).|\11|' \ -e 's|^# *\(export SERVICED_MASTER=\).|\11|' \

Installing Zenoss Control Center

Zenoss, Inc. 7

/etc/default/serviced■ To configure the target host as a resource pool host, enter the following commands.

1 Create a variable for the IP address or hostname of the master host.

Note If you enter the hostname, all hosts in your Zenoss Control Center deployment must be ableto resolve the hostname, either through an entry in /etc/hosts or through a nameserver on yournetwork.

MHOST=XX.XX.XX.XX2 Edit the /etc/default/serviced file.

sudo sed -i -e 's|^# *\(export HOME=/root\)|\1|' \ -e 's|^# *\(export SERVICED_REGISTRY=\).|\11|' \ -e 's|^# *\(export SERVICED_AGENT=\).|\11|' \ -e 's|^# *\(export SERVICED_MASTER=\).|\10|' \ -e 's|^# *\(export SERVICED_MASTER_IP=\).*|\1'${MHOST}'|' \ -e '/=$SERVICED_MASTER_IP/ s|^# *||' \ /etc/default/serviced

5 Optional: Specify an alternate private subnet for Zenoss Control Center, if necessary.

By default, Zenoss Control Center uses the 10.3/16 private subnet for virtual IP addresses. If your environmentalready uses 10.3/16 for other purposes, select an unused subnet for Zenoss Control Center, and add it to the /etc/default/serviced file.

Note RFC 1918 restricts private networks to the 10.0/24, 172.16/20, and 192.168/16 address spaces.However, Zenoss Control Center accepts any valid IPv4 16-bit address space for its private use.

For example, to set the private subnet for Zenoss Control Center to 10.20/16, enter the following commands:

SUBNET=10.20sudo sed -i -e \ 's|^# *\(export SERVICED_VIRTUAL_ADDRESS_SUBNET=\).*|\1'${SUBNET}'|' \ /etc/default/serviced

Note All hosts in a Zenoss Control Center deployment must have the same value for theSERVICED_VIRTUAL_ADDRESS_SUBNET variable.

6 Start the Zenoss Control Center service.sudo start serviced

Enabling client accessPerform this procedure after Zenoss Control Center master host is installed and configured.

1 Log in to the master host as a user with sudo privileges.2 Create one or more user accounts for access to the Zenoss Control Center browser interface, if desired.

Note Access to this interface is restricted to users with accounts on the master host. The users must bemembers of the docker and sudo groups.

Repeat the following steps for each user account to create. In each step, replace Account-Name with the name ofthe user account to add.a Create the account.

sudo adduser Account-Nameb Add the account to the docker group.

Zenoss Core Beta Installation Guide

8 Zenoss, Inc.

sudo usermod -aG docker Account-Namec Add the account to the sudo group.

sudo usermod -aG sudo Account-Name3 Enable access to the services that are running in containers.

Zenoss Control Center proxies the IP addresses of the services it manages, because the addresses change duringnormal operations. To simplify access, Zenoss Control Center provides virtual host aliases for the Zenoss Coreservices it manages.

To enable access to Zenoss Core services, add the virtual host aliases to a DNS server, or to the /etc/hostsfile (or its equivalent) of client systems from which you wish to gain access to services.

The following line shows the syntax of the entry to add to a DNS server or /etc/hosts file.

IP-Address Host.Domain Host zenoss5x.Host hbase.Host opentsdb.Host

The following example shows an entry for a master host at IP address 192.168.254.254, named mypc, inthe example.com domain.

192.168.254.254 mypc.example.com mypc zenoss5x.mypc hbase.mypc opentsdb.mypc

Editing the hosts file of a Windows 7 system

1 Log in to the Windows 7 system as a user with administrative privileges.2 From the Start menu, highlight All Programs > Accessories > Notepad.3 Right click, and then select Run as administrator.4 From the Notepad File menu, select Open.5 In the File name field of the Open window, enter C:\Windows\System32\drivers\etc\hosts.6 Insert the entry for your Zenoss Control Center master host at the end of the file.7 Save the file and exit Notepad.

Zenoss Core browser interfacesThe following table describes the Zenoss Core browser interfaces available through the Zenoss Control Centermaster host.

Note For each interface address, substitute the hostname of your master host for Master.

Address Interface Name Description

https://Master Zenoss Control Center The browser interface of the Zenoss Docker-based management system. Access to thisinterface is restricted to users with accounts onthe master host. The users must be members ofthe docker and sudo groups.

https://zenoss5x.Master Zenoss Core The browser interface of Zenoss Core.

https://hbase.Master Apache HBase The browser interface of the Apache HBaseinstance in which OpenTSDB stores devicemonitoring data. This is a read-only interface.

Installing Zenoss Control Center

Zenoss, Inc. 9

Address Interface Name Description

https://opentsdb.Master OpenTSDB The browser interface of the OpenTSDBdatabase which Zenoss Core uses to manage andmanipulate device monitoring data.

Starting Zenoss CorePerform this procedure after enabling client access.

1 Log in to the Zenoss Control Center web interface.

For example, if the master host is mypc, then the address of the Zenoss Control Center web interface ishttps://mypc.

Note Access to this interface is restricted to users with accounts on the master host. The users must bemembers of the sudo and docker groups.

Figure 1: Initial page

2 Add hosts to the default resource pool.a At the top of the page, click Hosts.

Figure 2: Hosts page

b On the right side of the Hosts page, click the + Host button.

Figure 3: Add Host dialog

c In the Host and Port field, enter the hostname or IP address of the machine to add, followed by a coloncharacter (:), and then 4979.

■ If you enter a hostname, all hosts in your Zenoss Control Center deployment must be able to resolve thename, either through an entry in /etc/hosts or through a nameserver on your network.

Zenoss Core Beta Installation Guide

10 Zenoss, Inc.

■ Port 4979 is the default port Zenoss Control Center uses to communicate among hosts in resource pools.The default can be changed.

d In the Resource Pool ID field, select default from the list, and then click Add Host.Repeat these steps for each host in your Zenoss Control Center deployment.

3 Deploy an application.a At the right side of the page, click the + Application button.

Figure 4: Deployment Wizard dialog

b In the Deployment Wizard dialog, mark the checkbox of an application, and then click Next.c Select the radio button of the default pool, and then click Next.d In the Deployment ID field, enter a name for the deployment, and then click Deploy.

The deployment step can take 10-20 minutes.4 Start an application.

a At the top of the page, click Applications.

Figure 5: Applications page

b In the Actions column, click the Start control.To display the application details page, click the name of an application, in the Application column.

Installing resource pool hosts

Zenoss, Inc. 11

Installing resource pool hosts 2You may add hosts to the default Zenoss Control Center resource pool any time after the master host is installed.

Resource pool host requirementsZenoss Control Center requires a real or virtual machine with the following features for resource pool hosts.

Note Under-resourced hosts will not function properly. Choose the recommended values whenever possible, andavoid any attempt to evaluate this release on machines that do not meet the minimum requirements.

■ 2 CPUs minimum, 4 recommended (64-bit only)■ 8GB RAM minimum■ 20GB local storage (network file systems not supported)■ Ubuntu Linux 14.04, server or desktop (64-bit version)

The following capabilities or information are required to install Zenoss Control Center on a resource pool host.

■ A user account with sudo privileges.

Note The installation commands are written for the bash shell.

■ Public internet access.■ The public or primary IPv4 addresses of the Zenoss Control Center master host and all resource pool hosts, in

dot-decimal notation.

In addition, each host in the pool

■ must be able to resolve the hostnames of all other hosts in the pool, including the master host■ must return a unique result from the hostid command■ must have a network latency of less than 5 milliseconds between itself and all other hosts in a Zenoss Control

Center deployment■ must respond with an IPv4 address other than 127.x.x.x when ping Host-Name is invoked

Installing Zenoss CoreFollow this procedure to install Zenoss Core on a master or resource pool host.

1 Log in to the target host (master or resource pool host) as a user with sudo and docker privileges.2 Install the Zenoss Core service template.

Zenoss Core Beta Installation Guide

12 Zenoss, Inc.

sudo apt-get install -y zenoss-core-service3 Configure the Zenoss Control Center daemon to restart upon reboot.

S1='start on (filesystem and started docker and 'S2='(started network-interface or started 'S3='network-manager or started networking) )'NEW="\n${S1}${S2}${S3}"sudo sed -i -e 's|^\(start on.*\)$|#\1|' \ -e '/^#start on/ s|$|'"${NEW}"'|' \ /etc/init/serviced.conf

4 Optional: Configure the target host for multi-host deployment, if necessary.

The /etc/default/serviced file contains variables that define the character of an instance of ZenossControl Center. Its defaults configure the master host for single-host deployment. For more information aboutserviced configuration options, see Configuring Zenoss Control Center on page 21.

Note Do not edit /etc/default/serviced for a single-host deployment.

■ To configure the target host as the master host, edit the /etc/default/serviced file with thefollowing command.

sudo sed -i -e 's|^# *\(export HOME=/root\)|\1|' \ -e 's|^# *\(export SERVICED_REGISTRY=\).|\11|' \ -e 's|^# *\(export SERVICED_AGENT=\).|\11|' \ -e 's|^# *\(export SERVICED_MASTER=\).|\11|' \ /etc/default/serviced

■ To configure the target host as a resource pool host, enter the following commands.

1 Create a variable for the IP address or hostname of the master host.

Note If you enter the hostname, all hosts in your Zenoss Control Center deployment must be ableto resolve the hostname, either through an entry in /etc/hosts or through a nameserver on yournetwork.

MHOST=XX.XX.XX.XX2 Edit the /etc/default/serviced file.

sudo sed -i -e 's|^# *\(export HOME=/root\)|\1|' \ -e 's|^# *\(export SERVICED_REGISTRY=\).|\11|' \ -e 's|^# *\(export SERVICED_AGENT=\).|\11|' \ -e 's|^# *\(export SERVICED_MASTER=\).|\10|' \ -e 's|^# *\(export SERVICED_MASTER_IP=\).*|\1'${MHOST}'|' \ -e '/=$SERVICED_MASTER_IP/ s|^# *||' \ /etc/default/serviced

5 Optional: Specify an alternate private subnet for Zenoss Control Center, if necessary.

By default, Zenoss Control Center uses the 10.3/16 private subnet for virtual IP addresses. If your environmentalready uses 10.3/16 for other purposes, select an unused subnet for Zenoss Control Center, and add it to the /etc/default/serviced file.

Note RFC 1918 restricts private networks to the 10.0/24, 172.16/20, and 192.168/16 address spaces.However, Zenoss Control Center accepts any valid IPv4 16-bit address space for its private use.

For example, to set the private subnet for Zenoss Control Center to 10.20/16, enter the following commands:

SUBNET=10.20sudo sed -i -e \ 's|^# *\(export SERVICED_VIRTUAL_ADDRESS_SUBNET=\).*|\1'${SUBNET}'|' \

Installing resource pool hosts

Zenoss, Inc. 13

/etc/default/serviced

Note All hosts in a Zenoss Control Center deployment must have the same value for theSERVICED_VIRTUAL_ADDRESS_SUBNET variable.

6 Start the Zenoss Control Center service.sudo start serviced

Zenoss Core Beta Installation Guide

14 Zenoss, Inc.

Installing an appliance virtual machine AThis beta release includes a VMware appliance package of a virtual machine with Zenoss Core 5.0.0b2 alreadyinstalled. Downloading and using an appliance can simplify your evalutation process.

Note Appliance package files are large, about 4GB. Plan your download accordingly.

The appliance has the following specifications.

■ Ubuntu Linux 14.04 server (64-bit version)■ 4 CPU cores (64-bit)■ 16GB RAM■ 50GB disk virtual, 11GB actual

Note The appliance also includes /usr/bin/zenossccreset.sh, which stops and then restarts ZenossControl Center, and provides feedback if a restart fails.

Downloading the appliance file

To download the file, click the following link, or use wget or curl to retrieve the file.

http://beta.zenoss.io/Core-5-Beta-2/Appliance/VMware/zenoss-core-5.0.0b2-621.vmware.ova

Importing an appliance with VMware Player or VMware WorkstationTo perform this procedure, you need either VMware Player or VMware Workstation installed on a 64-bit host system,with sufficient resources to support the appliance virtual machine.

Note To use VMware Player, the appliance file must be unpacked with the ovftool command.

1 In the VMware GUI, use File > Open... to open the appliance file.2 Adjust the specifications.

Zenoss recommends obtaining a new MAC address on import or before starting the appliance.3 Set networking to bridged mode.

The default setting is NAT mode, which prevents access to web interfaces from hosts other than the masterhost.

4 Start the appliance and log in.The user account name is zenoss and the password is zenoss.

Installing an appliance virtual machine

Zenoss, Inc. 15

Enabling client accessPerform this procedure after Zenoss Control Center master host is installed and configured.

1 Log in to the master host as a user with sudo privileges.2 Create one or more user accounts for access to the Zenoss Control Center browser interface, if desired.

Note Access to this interface is restricted to users with accounts on the master host. The users must bemembers of the docker and sudo groups.

Repeat the following steps for each user account to create. In each step, replace Account-Name with the name ofthe user account to add.a Create the account.

sudo adduser Account-Nameb Add the account to the docker group.

sudo usermod -aG docker Account-Namec Add the account to the sudo group.

sudo usermod -aG sudo Account-Name3 Enable access to the services that are running in containers.

Zenoss Control Center proxies the IP addresses of the services it manages, because the addresses change duringnormal operations. To simplify access, Zenoss Control Center provides virtual host aliases for the Zenoss Coreservices it manages.

To enable access to Zenoss Core services, add the virtual host aliases to a DNS server, or to the /etc/hostsfile (or its equivalent) of client systems from which you wish to gain access to services.

The following line shows the syntax of the entry to add to a DNS server or /etc/hosts file.

IP-Address Host.Domain Host zenoss5x.Host hbase.Host opentsdb.Host

The following example shows an entry for a master host at IP address 192.168.254.254, named mypc, inthe example.com domain.

192.168.254.254 mypc.example.com mypc zenoss5x.mypc hbase.mypc opentsdb.mypc

Editing the hosts file of a Windows 7 system

1 Log in to the Windows 7 system as a user with administrative privileges.2 From the Start menu, highlight All Programs > Accessories > Notepad.3 Right click, and then select Run as administrator.4 From the Notepad File menu, select Open.5 In the File name field of the Open window, enter C:\Windows\System32\drivers\etc\hosts.6 Insert the entry for your Zenoss Control Center master host at the end of the file.7 Save the file and exit Notepad.

Zenoss Core browser interfacesThe following table describes the Zenoss Core browser interfaces available through the Zenoss Control Centermaster host.

Note For each interface address, substitute the hostname of your master host for Master.

Zenoss Core Beta Installation Guide

16 Zenoss, Inc.

Address Interface Name Description

https://Master Zenoss Control Center The browser interface of the Zenoss Docker-based management system. Access to thisinterface is restricted to users with accounts onthe master host. The users must be members ofthe docker and sudo groups.

https://zenoss5x.Master Zenoss Core The browser interface of Zenoss Core.

https://hbase.Master Apache HBase The browser interface of the Apache HBaseinstance in which OpenTSDB stores devicemonitoring data. This is a read-only interface.

https://opentsdb.Master OpenTSDB The browser interface of the OpenTSDBdatabase which Zenoss Core uses to manage andmanipulate device monitoring data.

Starting Zenoss CorePerform this procedure after enabling client access.

1 Log in to the Zenoss Control Center web interface.

For example, if the master host is mypc, then the address of the Zenoss Control Center web interface ishttps://mypc.

Note Access to this interface is restricted to users with accounts on the master host. The users must bemembers of the sudo and docker groups.

Figure 6: Initial page

2 Add hosts to the default resource pool.a At the top of the page, click Hosts.

Figure 7: Hosts page

b On the right side of the Hosts page, click the + Host button.

Installing an appliance virtual machine

Zenoss, Inc. 17

Figure 8: Add Host dialog

c In the Host and Port field, enter the hostname or IP address of the machine to add, followed by a coloncharacter (:), and then 4979.

■ If you enter a hostname, all hosts in your Zenoss Control Center deployment must be able to resolve thename, either through an entry in /etc/hosts or through a nameserver on your network.

■ Port 4979 is the default port Zenoss Control Center uses to communicate among hosts in resource pools.The default can be changed.

d In the Resource Pool ID field, select default from the list, and then click Add Host.Repeat these steps for each host in your Zenoss Control Center deployment.

3 Deploy an application.a At the right side of the page, click the + Application button.

Figure 9: Deployment Wizard dialog

b In the Deployment Wizard dialog, mark the checkbox of an application, and then click Next.c Select the radio button of the default pool, and then click Next.d In the Deployment ID field, enter a name for the deployment, and then click Deploy.

The deployment step can take 10-20 minutes.4 Start an application.

a At the top of the page, click Applications.

Zenoss Core Beta Installation Guide

18 Zenoss, Inc.

Figure 10: Applications page

b In the Actions column, click the Start control.To display the application details page, click the name of an application, in the Application column.

Maintenance tasks

Zenoss, Inc. 19

Maintenance tasks BInstalling a ZenPack

1 Log in to the master host or a resource pool host as a user with sudo and docker privileges.2 Download the egg file of the ZenPack to install.

The ZenPack egg file must be located on the local filesystem, and readable by the current user.3 Change directory to the directory in which the ZenPack egg file is located, and then install the ZenPack.

sudo serviced service run zope zenpack install ZenPack-File-Name4 Create a unique identifier.

Any string may be used; the following command creates an identifier based on the date and time.CONTAINER_NAME=$(date +'%Y%m%d-%H%M%S'); echo $CONTAINER_NAME

5 Edit the Zope configuration file.

sudo serviced service shell -s $CONTAINER_NAME Zope \ "sed -i -e 's|^\(zserver-thread.*\)$|#\1|' /opt/zenoss/etc/zope.conf"

6 Create an identifier for the container in which the Zope configuration file is changed.

CONTAINER_ID=$(docker inspect --format {{.Id}} $CONTAINER_NAME);\ echo $CONTAINER_ID

7 Commit the changed container to the local Docker registry.

sudo serviced snapshot commit $CONTAINER_ID

Reducing high load averages on AWS hostswhen Docker is using the devicemapper storage driver. a Zenoss Control Center instance on an Amazon WebServices host may experience persistent, high averages for CPU load.

To diagnose and remedy this condition, perform this procedure.

1 Log in to the master host or a resource pool host as a user with sudo and docker privileges.2 Display information about Docker.

sudo docker info

Sample output:

Containers: 8Images: 5Storage Driver: devicemapper

Zenoss Core Beta Installation Guide

20 Zenoss, Inc.

Root Dir: /var/lib/docker/devicemapper Dirs: 21Execution Driver: native-0.2Kernel Version: 3.13.0-33-genericWARNING: No swap limit support

■ If the storage driver is devicemapper, continue this procedure.■ If the storage driver is not devicemapper, stop this procedure The cause of high load averages lies

elsewhere.3 Stop the serviced and docker daemons, in order.

sudo stop serviced; sudo stop docker4 Edit the docker defaults file.

The DOCKER_OPTS variable in /etc/default/docker provides startup options for the dockerdaemon.grep '^[^#]*DOCKER_OPTS' /etc/default/docker

■ If the preceding command returns a result, add the required option to the existing options.

newopt='--storage-opt dm.blkdiscard=false' opt=$(grep '^[^#]*DOCKER_OPTS' /etc/default/docker)opt=${opt#*=}; optqc=${opt:0:1}; optlen=${#opt}opt=${opt:1:($optlen-2)}MYOPT="${optqc}${opt} ${newopt}${optqc}"sudo sed -i -e \ 's|^[^#]*DOCKER_OPTS=.*$|DOCKER_OPTS='"${MYOPT}"'|' \ /etc/default/docker

■ If the preceding command does not return a result, define the DOCKER_OPTS variable with the requiredoption.

MYOPT='\nDOCKER_OPTS="--storage-opt dm.blkdiscard=false"'sudo sed -i -e '/^#DOCKER_OPTS=/ s|$|'"${MYOPT}"'|' \ /etc/default/docker

5 Start the docker and serviced daemons, in order.sudo start docker; sudo start serviced

Converting a single-host deployment to multi-hostYou may add hosts to a single-host deployment by following the steps in this procedure.

1 Install Zenoss Core on resource pool hosts.For more information, see Installing resource pool hosts on page 11.

2 Log in to the Zenoss Control Center web interface.3 Stop all applications.4 Log in to the master host as a user with sudo and docker privileges.5 Stop the serviced daemon.

sudo stop serviced6 Edit the /etc/default/serviced file.

sudo sed -i -e 's|^# *\(export HOME=/root\)|\1|' \ -e 's|^# *\(export SERVICED_REGISTRY=\).|\11|' \ -e 's|^# *\(export SERVICED_AGENT=\).|\11|' \ -e 's|^# *\(export SERVICED_MASTER=\).|\11|' \ /etc/default/serviced

7 Start serviced.sudo start serviced

8 Synchronize the local Docker registry with the resource pool hosts.

Maintenance tasks

Zenoss, Inc. 21

sudo serviced docker sync9 In the Zenoss Control Center web interface, start applications.

Deploying multiple instances of a serviceZenoss Control Center can not deploy more than one instance of a service that includes virtual host names, suchas Zenoss Core, unless the virtual host names are unique. Follow this procedure to modify a service template anddeploy multiple instances of a service.

1 Log in to the Zenoss Control Center master host as a user with sudo and docker privileges.2 Change directory to the Zenoss Control Center templates directory.

cd /opt/serviced/templates3 Copy a template file.

sudo cp zenoss-core-5.0.0b2_621.json \ test-zenoss-core-5.0.0b2_621.json

4 Use a text editor to make the following changes to the new service template file:a Optional: Change the value of the Name field on line 3.

This change helps differentiate service templates.b Change the values of the defined VHosts fields in all subservice Endpoints objects.

For example, in the Zenoss Core service template, change the zenoss5x, hbase, and opentsdb virtualhost names.

5 Use the serviced command-line interface to add the new service template.

sudo serviced template add \ test-zenoss-core-5.0.0b2_621.json

6 Log in to the Zenoss Control Center web interface, and deploy the new service template.

Configuring Zenoss Control CenterZenoss Control Center (serviced) is a single binary that behaves differently based on the variables defined inits startup script, /etc/init/serviced.conf, and in its defaults file, /etc/default/serviced. Thevalues in the defaults file take precedence over the values defined in the startup script.

The following list describes the contents of /etc/default/serviced and their affects on the serviceddaemon.HOME

Default: /rootThe path serviced uses to locate the .dockercfg file.

This variable is included in the startup script, /etc/init/serviced.conf.GOMAXPROCS

Default: 2The maximum number of CPU cores serviced uses.

This variable is included in the startup script, /etc/init/serviced.conf.SERVICED_AGENT

Default: 1 (true)One of two variables that determine whether serviced assumes the role of agent or master. The othervariable is SERVICED_MASTER.

■ To configure serviced as an agent:

Zenoss Core Beta Installation Guide

22 Zenoss, Inc.

SERVICED_AGENT=1SERVICED_MASTER=0

■ To configure serviced as the master:

SERVICED_AGENT=1SERVICED_MASTER=1

This variable is included in the startup script, /etc/init/serviced.conf.SERVICED_MASTER

Default: 1 (true)One of two variables that determine whether serviced assumes the role of agent or master. The othervariable is SERVICED_AGENT.

This variable is included in the startup script, /etc/init/serviced.conf.SERVICED_MASTER_POOLID

Default: defaultThe name of the resource pool in which the serviced instance configured as master is located.

SERVICED_MASTER_IP

Default: 172.17.42.1The IP address of the serviced instance configured as master. This variable simplifies the configuration ofmulti-host deployments.

SERVICED_ZK

Default: $SERVICED_MASTER_IP:2181The list of endpoints in serviced's ZooKeeper ensemble, separated by the comma character (,). Currently, theserviced instance configured as master is the only host in the ZooKeeper ensemble.

SERVICED_REGISTRY

Default: 0 (false)Determines whether serviced sets up a local registry for images, so that hosts can pull from it instead of theremote download registry.

SERVICED_DOCKER_REGISTRY

Default: $SERVICED_MASTER_IP:5000The IP address and port number of the serviced registry host.

SERVICED_STATIC_IPS

Default: 10.0.0.30,10.0.0.31The list of static IP addresses reserved for serviced to use when it advertises external IP addresses on behalfof services it manages, separated by the comma character (,).

SERVICED_ENDPOINT

Default: $SERVICED_MASTER_IP:4979The IP address and port number of the default serviced RPC endpoint.

SERVICED_RPC_PORT

Default: 4979The port on which serviced listens for RPC requests.

SERVICED_UI_PORT

Default: 443The port on which serviced listens for HTTPS requests. (The web interface port.)

SERVICED_MUX_PORT

Default: 22250

Maintenance tasks

Zenoss, Inc. 23

The port serviced uses for multiplexing on its private subnet.SERVICED_VARPATH

Default: /opt/serviced/varThe path of the local directory in which serviced stores its data files, including the distributed file systemfiles.

SERVICED_KEY_FILE

Default: /etc/....The path of a TLS key file. By default, no key file is installed.

SERVICED_CERT_FILE

Default: /etc/....The path of a TLS certificate file. By default, no certificate file is installed.

SERVICED_VFS

Default: rsyncThe driver for virtual file system volumes. The supported drivers are rsync and btrfs.

SERVICED_VHOST_ALIASES

Default: foobar.com,example.comThe list of virtual host aliases to use in virtual host multiplexing, separated by the comma character (,).

SERVICED_MAX_CONTAINER_AGE

Default: `expr 24*60*60` (86400 seconds)The maximum number of seconds serviced waits before removing a stopped container.

SERVICED_VIRTUAL_ADDRESS_SUBNET

Default: 10.3The 16-bit private subnet to use for serviced's virtual IPv4 addresses.

Note This value affects the values of SERVICED_STATIC_IPS.

SERVICED_LOG_LEVEL

Default: 0The relative amount of debug information to write to the /var/log/upstart/serviced.log file. Therange is 0 (minimum) to 5 (maximum).

SERVICED_LOG_ADDRESS

Default: $SERVICED_MASTER_IP:5042The endpoint of the logstash service.

Note For this beta release, use the SERVICED_OPTS variable to define logstash endpoint other than themaster host. For example, SERVICED_OPTS='--logstashurl myLogServer:5042'.

SERVICED_STATS_PORT

Default: $SERVICED_MASTER_IP:8443The endpoint of the OpenTSDB reader daemon, for serviced statistics.

SERVICED_STATS_PERIOD

Default: 10The number of seconds to wait between polls (health checks) of hosts in resource pools.

SERVICED_OPTS

Default: (empty)Arbitrary options for the serviced startup command.