spurious-server 0.4.1 → 0.5.0
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/config/images.yaml +16 -5
- data/lib/spurious/server/state/init.rb +6 -3
- data/lib/spurious/server/state/ports.rb +3 -1
- data/lib/spurious/server/state/start.rb +2 -1
- data/lib/spurious/server/version.rb +1 -1
- data/spurious-server.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a78a870b1812bb3c048ea34b731c1fc737922f26
|
4
|
+
data.tar.gz: f2d9fa79559f110eadee3a47c99208e46fea7e47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a7964dfafa370163e54c93a5c8371a24f2d59b684afd825eda7c06c470a8e38900c6a6041005d7d4bac1bc30b43016ef81267fcb06332d29c5c50cbd88c57db
|
7
|
+
data.tar.gz: a956d37ef07aac7b88b855df2a090009b401415d27493df87a98e4126b4fb30f5011d982aa31c27e54e02709965d062dbaeff25c07e418b193022b044f88ad66
|
data/config/images.yaml
CHANGED
@@ -1,26 +1,37 @@
|
|
1
1
|
'spurious-sqs':
|
2
|
-
:image: '
|
2
|
+
:image: 'spurious/sqs'
|
3
|
+
:hostname: 'sqs.spurious.localhost'
|
3
4
|
|
4
5
|
'spurious-s3':
|
5
|
-
:image: '
|
6
|
+
:image: 'spurious/s3'
|
7
|
+
:hostname: 's3.spurious.localhost'
|
6
8
|
|
7
9
|
'spurious-dynamo':
|
8
|
-
:image: '
|
10
|
+
:image: 'spurious/dynamodb'
|
11
|
+
:hostname: 'dynamodb.spurious.localhost'
|
9
12
|
|
10
13
|
'spurious-memcached':
|
11
14
|
:image: 'smaj/memcached'
|
12
15
|
|
13
16
|
'spurious-elasticache':
|
14
|
-
:image: '
|
17
|
+
:image: 'spurious/elasticache'
|
15
18
|
:link:
|
16
19
|
- 'spurious-memcached:memcached01'
|
17
20
|
:env:
|
18
21
|
FAKEELASTICACHE_DEFAULT_HOST: '127.0.0.1'
|
19
22
|
|
20
23
|
'spurious-elasticache-docker':
|
21
|
-
:image: '
|
24
|
+
:image: 'spurious/elasticache'
|
22
25
|
:ignore:
|
23
26
|
:create: true
|
24
27
|
:delete: true
|
25
28
|
:link:
|
26
29
|
- 'spurious-memcached:memcached01'
|
30
|
+
|
31
|
+
'spurious-browser':
|
32
|
+
:image: 'spurious/browser'
|
33
|
+
:link:
|
34
|
+
- 'spurious-dynamo:dynamodb.spurious.localhost'
|
35
|
+
- 'spurious-sqs:sqs.spurious.localhost'
|
36
|
+
- 'spurious-s3:s3.spurious.localhost'
|
37
|
+
:hostname: 'browser.spurious.localhost'
|
@@ -33,8 +33,8 @@ module Spurious
|
|
33
33
|
end
|
34
34
|
container_cmd = []
|
35
35
|
|
36
|
-
if meta[:image] == '
|
37
|
-
container_cmd = ['-
|
36
|
+
if meta[:image] == 'spurious/s3'
|
37
|
+
container_cmd = ['-H', meta[:hostname]]
|
38
38
|
end
|
39
39
|
|
40
40
|
create_container = Proc.new do
|
@@ -62,7 +62,10 @@ module Spurious
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def operation_complete(complete)
|
65
|
-
|
65
|
+
if complete
|
66
|
+
send("#{app_config.length} containers successfully initialized", :info, false, :green)
|
67
|
+
send("Please add the following to your /etc/hosts file:\n\n#{docker_host} sqs.spurious.localhost s3.spurious.localhost dynamodb.spurious.localhost browser.spurious.localhost\n", :info, true, :blue)
|
68
|
+
end
|
66
69
|
end
|
67
70
|
|
68
71
|
end
|
@@ -17,15 +17,17 @@ module Spurious
|
|
17
17
|
def execute!
|
18
18
|
ports = {}
|
19
19
|
spurious_containers.peach do |container|
|
20
|
+
a_config = app_config[container.json['Name'].gsub('/', '')]
|
20
21
|
config = container_config(container.json["Name"])
|
21
22
|
ports[sanitize(container.json["Name"])] = []
|
22
23
|
|
23
24
|
if !container.json["NetworkSettings"]["Ports"].nil? then
|
25
|
+
host = a_config
|
24
26
|
|
25
27
|
container.json["NetworkSettings"]["Ports"].each do |guest, mapping|
|
26
28
|
mapping.each do |map|
|
27
29
|
ports[sanitize(container.json["Name"])] << {
|
28
|
-
:Host => docker_host_ip,
|
30
|
+
:Host => a_config.fetch(:hostname, docker_host_ip),
|
29
31
|
:HostPort => map["HostPort"]
|
30
32
|
}
|
31
33
|
end
|
@@ -35,8 +35,9 @@ module Spurious
|
|
35
35
|
if container.json["Name"] == '/spurious-sqs' then
|
36
36
|
port_setup = Proc.new do
|
37
37
|
begin
|
38
|
+
container_config = app_config['spurious-sqs']
|
38
39
|
port = container.json["NetworkSettings"]["Ports"]['4568/tcp'].first['HostPort']
|
39
|
-
Net::HTTP.get(URI("http://#{docker_host_ip}:#{port}/host-details?host=#{
|
40
|
+
Net::HTTP.get(URI("http://#{docker_host_ip}:#{port}/host-details?host=#{container_config[:hostname]}&port=#{port}"))
|
40
41
|
rescue StandardError => e
|
41
42
|
end
|
42
43
|
end
|
data/spurious-server.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_runtime_dependency "eventmachine"
|
26
26
|
spec.add_runtime_dependency "em-synchrony"
|
27
|
-
spec.add_runtime_dependency "docker-api"
|
27
|
+
spec.add_runtime_dependency "docker-api", "1.13.6"
|
28
28
|
spec.add_runtime_dependency "daemons"
|
29
29
|
spec.add_runtime_dependency "peach"
|
30
30
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spurious-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Jack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: docker-api
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - '
|
87
|
+
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 1.13.6
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - '
|
94
|
+
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 1.13.6
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: daemons
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|