distribot 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.docker/Dockerfile.base +24 -0
- data/{Dockerfile.bundle → .docker/Dockerfile.bundle} +0 -0
- data/distribot.gemspec +1 -1
- data/lib/distribot/connector.rb +2 -1
- metadata +3 -5
- data/Dockerfile +0 -9
- data/provision/nodes.sh +0 -80
- data/provision/templates/fluentd.conf +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07ee26e565a08fa420f1de3dc923576e6ec23cad
|
4
|
+
data.tar.gz: 30a0aa682bd3980696528d89831c4e3af4b546a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dc00eb1f02d685570ca398deb7d432fcefdedeae64996d8d94bdd7e48154fbfc380c57fd9b65e0d252d26e701759489dc6f6c19edf3ebe536369b8ef0649e9a
|
7
|
+
data.tar.gz: 1d681b5e718583624d7e52dfad6226f7f06f2cd7c1a9c52a1a8577f7b476d233c5bb12063c0d48b04efaab955b0a949006d0a5ace27a8b1f4cb3ec6c84c6c96f
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
FROM ubuntu:15.10
|
3
|
+
|
4
|
+
RUN \
|
5
|
+
apt-get update \
|
6
|
+
&& apt-get install -y \
|
7
|
+
sudo \
|
8
|
+
curl \
|
9
|
+
ruby2.2 \
|
10
|
+
ruby2.2-dev \
|
11
|
+
build-essential \
|
12
|
+
git \
|
13
|
+
&& gem2.2 install bundler --no-ri --no-rdoc \
|
14
|
+
&& gem2.2 install foreman --no-ri --no-rdoc \
|
15
|
+
&& useradd -d /home/ubuntu -m -s /bin/bash ubuntu \
|
16
|
+
&& echo "ubuntu:changeme" | chpasswd \
|
17
|
+
&& echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
|
18
|
+
&& sed -i s#/home/ubuntu:/bin/false#/home/ubuntu:/bin/bash# /etc/passwd
|
19
|
+
|
20
|
+
COPY Gemfile /tmp/Gemfile
|
21
|
+
COPY Gemfile.lock /tmp/Gemfile.lock
|
22
|
+
COPY distribot.gemspec /tmp/distribot.gemspec
|
23
|
+
USER ubuntu
|
24
|
+
RUN cd /tmp/ && bundle
|
File without changes
|
data/distribot.gemspec
CHANGED
data/lib/distribot/connector.rb
CHANGED
@@ -20,7 +20,8 @@ module Distribot
|
|
20
20
|
uri.scheme = 'http'
|
21
21
|
uri.port = '15672'.to_i
|
22
22
|
uri.path = '/api/queues'
|
23
|
-
|
23
|
+
# XXX: Awful hack because Net::HTTP.get fails with 401.
|
24
|
+
JSON.parse( `curl #{uri.to_s}` ).map{ |x| x['name'] }
|
24
25
|
end
|
25
26
|
|
26
27
|
def logger
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: distribot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Drago
|
@@ -232,12 +232,12 @@ executables:
|
|
232
232
|
extensions: []
|
233
233
|
extra_rdoc_files: []
|
234
234
|
files:
|
235
|
+
- .docker/Dockerfile.base
|
236
|
+
- .docker/Dockerfile.bundle
|
235
237
|
- .gitignore
|
236
238
|
- .rspec
|
237
239
|
- .rubocop.yml
|
238
240
|
- .travis.yml
|
239
|
-
- Dockerfile
|
240
|
-
- Dockerfile.bundle
|
241
241
|
- Gemfile
|
242
242
|
- Gemfile.lock
|
243
243
|
- LICENSE
|
@@ -268,8 +268,6 @@ files:
|
|
268
268
|
- lib/distribot/phase_started_handler.rb
|
269
269
|
- lib/distribot/task_finished_handler.rb
|
270
270
|
- lib/distribot/worker.rb
|
271
|
-
- provision/nodes.sh
|
272
|
-
- provision/templates/fluentd.conf
|
273
271
|
- spec/distribot/bunny_connector_spec.rb
|
274
272
|
- spec/distribot/connection_sharer_spec.rb
|
275
273
|
- spec/distribot/connector_spec.rb
|
data/Dockerfile
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
|
2
|
-
FROM ubuntu:14.04
|
3
|
-
RUN useradd -d /home/ubuntu -m -s /bin/bash ubuntu
|
4
|
-
ADD ./ /var/www/distribot
|
5
|
-
RUN echo "ubuntu:changeme" | chpasswd
|
6
|
-
RUN echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
7
|
-
RUN sed -i s#/home/ubuntu:/bin/false#/home/ubuntu:/bin/bash# /etc/passwd
|
8
|
-
USER ubuntu
|
9
|
-
WORKDIR /var/www/distribot
|
data/provision/nodes.sh
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
set -e
|
4
|
-
|
5
|
-
setup_dependencies() {
|
6
|
-
sudo apt-get -y update
|
7
|
-
sudo apt-get -y autoremove
|
8
|
-
sudo apt-get install -y \
|
9
|
-
ruby2.0 \
|
10
|
-
ruby2.0-dev \
|
11
|
-
build-essential \
|
12
|
-
git \
|
13
|
-
wget \
|
14
|
-
vim \
|
15
|
-
librabbitmq-dev \
|
16
|
-
psmisc \
|
17
|
-
curl \
|
18
|
-
libcurl4-gnutls-dev \
|
19
|
-
python
|
20
|
-
|
21
|
-
sudo ln -sf /usr/bin/ruby2.0 /usr/bin/ruby && sudo ln -sf /usr/bin/gem2.0 /usr/bin/gem
|
22
|
-
|
23
|
-
if ! gem list | grep bundler; then
|
24
|
-
sudo gem install bundler --no-ri --no-rdoc
|
25
|
-
fi
|
26
|
-
|
27
|
-
# Don't fail because we haven't added github.com's ssh key to our known_hosts:
|
28
|
-
cat <<EOF | sudo tee -a /etc/ssh/ssh_config > /dev/null
|
29
|
-
Host github.com
|
30
|
-
StrictHostKeyChecking no
|
31
|
-
EOF
|
32
|
-
|
33
|
-
sudo gem install eye --no-ri --no-rdoc
|
34
|
-
}
|
35
|
-
|
36
|
-
setup_fluentd() {
|
37
|
-
if [ -f /etc/init.d/td-agent ]; then
|
38
|
-
echo "fluentd is already installed"
|
39
|
-
else
|
40
|
-
curl -L http://toolbelt.treasuredata.com/sh/install-ubuntu-trusty-td-agent2.sh | sudo sh
|
41
|
-
fi
|
42
|
-
|
43
|
-
if td-agent-gem list | grep fluent-plugin-elasticsearch; then
|
44
|
-
echo "fluent-plugin-elasticsearch is already installed"
|
45
|
-
else
|
46
|
-
sudo td-agent-gem install fluent-plugin-elasticsearch -v 0.7.0 --no-ri --no-rdoc
|
47
|
-
fi
|
48
|
-
|
49
|
-
if grep "distribot" /etc/rsyslog.conf; then
|
50
|
-
echo "syslogd already forwarding events to fluentd"
|
51
|
-
else
|
52
|
-
echo '!distribot' | sudo tee -a /etc/rsyslog.conf
|
53
|
-
echo "*.* @127.0.0.1:42185" | sudo tee -a /etc/rsyslog.conf
|
54
|
-
fi
|
55
|
-
|
56
|
-
sudo cp provision/templates/fluentd.conf /etc/td-agent/td-agent.conf
|
57
|
-
|
58
|
-
sudo service rsyslog restart
|
59
|
-
|
60
|
-
# Finally, restart td-agent:
|
61
|
-
sudo service td-agent restart
|
62
|
-
}
|
63
|
-
|
64
|
-
setup_dependencies
|
65
|
-
|
66
|
-
while ! ( echo -e "443\n6379\n5672" | xargs -i nc -w 1 -zv $INFRA_HOST {} ) ; do
|
67
|
-
echo "Waiting for infra to come up..."
|
68
|
-
sleep 5
|
69
|
-
done
|
70
|
-
|
71
|
-
setup_fluentd
|
72
|
-
|
73
|
-
cd /var/www/distribot
|
74
|
-
bundle
|
75
|
-
|
76
|
-
echo '--------------------------------------------------------------------------'
|
77
|
-
echo '--------------------------------------------------------------------------'
|
78
|
-
echo '--------------------------------------------------------------------------'
|
79
|
-
echo '--------------------------------------------------------------------------'
|
80
|
-
echo '--------------------------------------------------------------------------'
|
@@ -1,27 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<source>
|
4
|
-
type syslog
|
5
|
-
port 42185
|
6
|
-
bind 127.0.0.1
|
7
|
-
tag syslog
|
8
|
-
</source>
|
9
|
-
|
10
|
-
<match **>
|
11
|
-
type copy
|
12
|
-
<store>
|
13
|
-
type stdout
|
14
|
-
</store>
|
15
|
-
|
16
|
-
<store>
|
17
|
-
type elasticsearch
|
18
|
-
logstash_format true
|
19
|
-
flush_interval 5s
|
20
|
-
type_name distribot
|
21
|
-
|
22
|
-
# We post data to https://<elasticsearch_hostname>/elastic/<index_name>/
|
23
|
-
hosts https://infra/elastic/
|
24
|
-
index_name distribot
|
25
|
-
</store>
|
26
|
-
|
27
|
-
</match>
|