-
Notifications
You must be signed in to change notification settings - Fork 813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packaging clean-up + SSL warning in http_check #778
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
be8866c
Do not allow dd-agent user to shell in
alq666 55a7351
Remove dd-agent user and group on uninstall
alq666 27c081f
Turn ssl validation of http_check into an option
alq666 8cc4c0a
Revert source install `set -e`
alq666 6efed09
#768 dd-agent is not part of any group on debian
alq666 f47df31
Vagrant VM for development
alq666 01a88e9
Add a centos test box
alq666 320bc8e
Fix provisioning on redhat
alq666 322c0cc
Redhat package cleans up after itself
alq666 a07a7f4
Make sure python is on debian7.1 to run the agent
alq666 3c4f78d
TAB -> spaces in http_check.yaml example
alq666 1833efd
Log a warning when graphite listener is on
alq666 3cd3973
Use self.warning in lieu of self.log.warn
alq666 f33a586
No home directory for dd-agent on RedHat
alq666 a5ff622
Set up a valid home directory even with no write access
alq666 e3fc113
Merge branch 'master' into pre-post-install-cleanup
alq666 01677c2
A more robust ganglia test
alq666 3097e7a
Use the same home directory for centos 5 and centos 6
alq666 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,5 @@ stats.dat | |
conf.d/*.yaml | ||
!conf.d/network.yaml | ||
packaging/build/ | ||
packaging/root/ | ||
packaging/root/ | ||
.vagrant/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | ||
VAGRANTFILE_API_VERSION = "2" | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
# All Vagrant configuration is done here. The most common configuration | ||
# options are documented and commented below. For a complete reference, | ||
# please see the online documentation at vagrantup.com. | ||
|
||
# Debian 7 box | ||
config.vm.define "debian" do |deb| | ||
deb.vm.box = "debagent" | ||
deb.vm.box_url = "https://dl.dropboxusercontent.com/s/xymcvez85i29lym/vagrant-debian-wheezy64.box" | ||
deb.vm.synced_folder ".", "/src" | ||
deb.vm.provider :virtualbox do |vb| | ||
# Use VBoxManage to customize the VM. For example to change memory: | ||
vb.customize ["modifyvm", :id, "--memory", "512"] | ||
end | ||
|
||
# Manual set-up | ||
deb.vm.provision "shell", inline: "sudo apt-get update" | ||
deb.vm.provision "shell", inline: "sudo apt-get -y install ruby" | ||
deb.vm.provision "shell", inline: "sudo apt-get -y install ruby-dev" | ||
deb.vm.provision "shell", inline: "sudo apt-get -y install python" | ||
deb.vm.provision "shell", inline: "sudo gem install --no-ri --no-rdoc fpm" | ||
end | ||
|
||
# Centos 6 box | ||
config.vm.define "redhat" do |rh| | ||
rh.vm.box = "rhagent" | ||
rh.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box" | ||
rh.vm.synced_folder ".", "/src" | ||
rh.vm.provider :virtualbox do |vb| | ||
# Use VBoxManage to customize the VM. For example to change memory: | ||
vb.customize ["modifyvm", :id, "--memory", "512"] | ||
end | ||
|
||
# Manual set-up | ||
rh.vm.provision "shell", inline: "sudo yum -y update" | ||
rh.vm.provision "shell", inline: "sudo yum -y install ruby" | ||
rh.vm.provision "shell", inline: "sudo yum -y install ruby-devel" | ||
rh.vm.provision "shell", inline: "sudo yum -y install rubygems" | ||
rh.vm.provision "shell", inline: "sudo gem install --no-ri --no-rdoc fpm" | ||
rh.vm.provision "shell", inline: "sudo yum -y localinstall http://yum.datadoghq.com/rpm/supervisor-3.0-0.5.a10.el6.noarch.rpm" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
getent passwd dd-agent > /dev/null && userdel dd-agent | ||
getent group dd-agent >/dev/null && groupdel dd-agent | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
getent group dd-agent >/dev/null || groupadd -r dd-agent | ||
getent passwd dd-agent >/dev/null || \ | ||
useradd -r -M -g dd-agent -d /tmp -s /bin/sh \ | ||
useradd -r -M -g dd-agent -d /usr/share/datadog/agent -s /bin/false \ | ||
-c "Datadog Agent" dd-agent | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ set -e | |
|
||
if [ "$1" = purge ]; then | ||
update-rc.d datadog-agent remove | ||
deluser dd-agent | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
getent passwd dd-agent >/dev/null && userdel dd-agent | ||
getent group dd-agent >/dev/null && groupdel dd-agent | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,8 @@ | |
import tempfile | ||
from util import json, md5 | ||
import time | ||
import xml.etree.ElementTree as tree | ||
from cStringIO import StringIO | ||
|
||
from checks.ganglia import Ganglia | ||
|
||
|
@@ -27,7 +29,13 @@ def testSpeed(self): | |
# profile.runctx("g.check({'ganglia_host': 'localhost', 'ganglia_port': 8651})", {}, {"g": g}, pfile.name) | ||
# p = pstats.Stats(pfile.name) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Simple re-ordering or spaces would create issues. Test based on semantics is better (even though just cursory). |
||
# p.sort_stats('time').print_stats() | ||
self.assertEquals(md5(g.check({'ganglia_host': 'localhost', 'ganglia_port': 8651})).hexdigest(), md5(open(TEST_FN).read()).hexdigest()) | ||
parsed = StringIO(g.check({'ganglia_host': 'localhost', 'ganglia_port': 8651})) | ||
original = open(TEST_FN) | ||
x1 = tree.parse(parsed) | ||
x2 = tree.parse(original) | ||
# Cursory test | ||
self.assertEquals([c.tag for c in x1.getroot()], [c.tag for c in x2.getroot()]) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -239,7 +239,6 @@ def get_tags(): | |
EC2_tags = None | ||
pass | ||
|
||
|
||
try: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Merely cosmetic. |
||
if socket_to is None: | ||
socket_to = 3 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point to an existing directory, but disable logins.