1# Linux Build Instructions 2 3These instructions assume you're running this on a Mac with Vagrant installed, 4and that the project directory ends up mounted in the VM at `/vagrant`. (this 5should happen automatically) 6 7## One-time setup of GPG keys: 8 9See the same section of this file in the pdagent project. 10 11## Ubuntu 12 13Building the .deb: 14 15 scons local-repo \ 16 gpg-home=build-linux/gnupg \ 17 virt=agent-minimal-ubuntu1204 18 19Install & test the .deb: 20 21 vagrant ssh agent-minimal-ubuntu1204 22 23Install the PagerDuty Agent using the Agent Install Guide on the PagerDuty 24website (under http://www.pagerduty.com/docs/). Then install the development 25build as follows: 26 27 sudo apt-key add /vagrant/target/tmp/GPG-KEY-pagerduty 28 sudo sh -c 'echo "deb file:///vagrant/target deb/" \ 29 >/etc/apt/sources.list.d/pdagent-integrations.list' 30 sudo apt-get update 31 sudo apt-get install pdagent-integrations 32 33 /usr/share/pdagent-integrations/bin/pd-zabbix # should run but fail with IndexError 34 35Uninstall & test cleanup: 36 37 sudo apt-get --yes remove pdagent-integrations 38 39 /usr/share/pdagent-integrations/bin/pd-zabbix # should not exist 40 41## CentOS / RHEL 42 43Building the .rpm: 44 45 scons local-repo \ 46 gpg-home=/gpg/path/used/earlier \ 47 virt=agent-minimal-centos65 48 49Install & test the .rpm: 50 51 vagrant ssh agent-minimal-centos65 52 53Install the PagerDuty Agent using the Agent Install Guide on the PagerDuty 54website (under http://www.pagerduty.com/docs/). Then install the development 55build as follows: 56 57``` 58sudo sh -c 'cat >/etc/yum.repos.d/pdagent-integrations.repo <<EOF 59[pdagent-integrations] 60name=PDAgent Integrations 61baseurl=file:///vagrant/target/rpm 62enabled=1 63gpgcheck=1 64gpgkey=file:///vagrant/target/tmp/GPG-KEY-pagerduty 65EOF' 66sudo yum install -y pdagent-integrations 67``` 68 69 /usr/share/pdagent-integrations/bin/pd-zabbix # should run but fail with IndexError 70 /usr/share/pdagent-integrations/bin/pd-zabbix # should fail with an error 71 72Uninstall & test cleanup: 73 74 sudo yum remove -y pdagent-integrations 75 76 /usr/share/pdagent-integrations/bin/pd-zabbix # should not exist 77