consul_stockpile 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c71ceb8d41a9a966491236bcb603a0e077693154
|
4
|
+
data.tar.gz: bc517ed1d50ced593ee03659416a5b9a3f488eb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 816221a751eb7186ab7a885103662adbda249ad6f9753d3e820466d243171f51f4af40ee94fad1d83c152120914921901b60d23114db0fb79f07da00075ffe9e
|
7
|
+
data.tar.gz: 051d85e6f05557d9093f83d2bce755b878e6481020a3a3cbf8cb6eafa07fd6fb5537a63d07688cf48b3234073aff60712e48ece85f4c50ff2e77569f0a076008
|
data/Dockerfile.release
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
FROM outstand/ruby-base:2.2.4-alpine
|
2
|
+
MAINTAINER Ryan Schlesinger <ryan@outstand.com>
|
3
|
+
|
4
|
+
RUN addgroup stockpile && \
|
5
|
+
adduser -S -G stockpile stockpile
|
6
|
+
|
7
|
+
ENV CONSUL_STOCKPILE_VERSION=0.1.1
|
8
|
+
|
9
|
+
RUN apk --no-cache add libxml2 libxslt \
|
10
|
+
&& apk --no-cache add --virtual build-dependencies build-base libxml2-dev libxslt-dev \
|
11
|
+
&& gem install nokogiri -- --use-system-libraries \
|
12
|
+
&& gem install consul_stockpile -v ${CONSUL_STOCKPILE_VERSION} \
|
13
|
+
&& apk del build-dependencies
|
14
|
+
|
15
|
+
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
16
|
+
|
17
|
+
ENV DUMB_INIT_SETSID 0
|
18
|
+
ENTRYPOINT ["/docker-entrypoint.sh"]
|
19
|
+
CMD ["consul_stockpile"]
|
data/README.md
CHANGED
@@ -29,9 +29,10 @@ Or install it yourself as:
|
|
29
29
|
|
30
30
|
To release a new version:
|
31
31
|
- Update the version number in `version.rb`
|
32
|
-
-
|
33
|
-
-
|
34
|
-
-
|
32
|
+
- `docker build -t outstand/consul_stockpile .`
|
33
|
+
- `docker run -it --rm -v ~/.gitconfig:/consul_stockpile/.gitconfig -v ~/.gitconfig.user:/consul_stockpile/.gitconfig.user -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.gem:/root/.gem outstand/consul_stockpile rake release`
|
34
|
+
- `docker build -t outstand/consul_stockpile:VERSION -f Dockerfile.release .`
|
35
|
+
- `docker push outstand/consul_stockpile:VERSION`
|
35
36
|
|
36
37
|
## Contributing
|
37
38
|
|
@@ -23,7 +23,7 @@ module ConsulStockpile
|
|
23
23
|
ConsulLock.with_lock(key: LOCK_KEY) do
|
24
24
|
if DetectCanary.call.exists
|
25
25
|
Logger.info 'Canary detected; skipping bootstrap.'
|
26
|
-
return
|
26
|
+
return OpenStruct.new(ran_bootstrap: false)
|
27
27
|
end
|
28
28
|
|
29
29
|
json = DownloadBackup.call(bucket: bucket).json_body
|
@@ -32,6 +32,7 @@ module ConsulStockpile
|
|
32
32
|
end
|
33
33
|
|
34
34
|
Logger.info 'Bootstrap complete.'
|
35
|
+
OpenStruct.new(ran_bootstrap: true)
|
35
36
|
end
|
36
37
|
end
|
37
38
|
end
|
@@ -15,8 +15,8 @@ module ConsulStockpile
|
|
15
15
|
if message == :bootstrap
|
16
16
|
Logger.tagged('Bootstrap') do
|
17
17
|
begin
|
18
|
-
BootstrapConsulKV.call(bucket: @bucket)
|
19
|
-
@backup_actor << :backup
|
18
|
+
ran_bootstrap = BootstrapConsulKV.call(bucket: @bucket).ran_bootstrap
|
19
|
+
@backup_actor << :backup if ran_bootstrap
|
20
20
|
rescue => e
|
21
21
|
Logger.warn "Warning: #{e.message}; retrying in 5 seconds"
|
22
22
|
Concurrent::ScheduledTask.execute(5){ tell :bootstrap }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consul_stockpile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Schlesinger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -216,6 +216,7 @@ extra_rdoc_files: []
|
|
216
216
|
files:
|
217
217
|
- ".gitignore"
|
218
218
|
- Dockerfile
|
219
|
+
- Dockerfile.release
|
219
220
|
- Gemfile
|
220
221
|
- README.md
|
221
222
|
- Rakefile
|