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: b59e8e2b4697347d0e8e63c956aac5e4533ae18f
4
- data.tar.gz: 5c8e759867192356ac72b0900ec2e16a0e64cd52
3
+ metadata.gz: c71ceb8d41a9a966491236bcb603a0e077693154
4
+ data.tar.gz: bc517ed1d50ced593ee03659416a5b9a3f488eb5
5
5
  SHA512:
6
- metadata.gz: 91fdc2a2413a3f64435266f6a0787aa346980daf3c1ecabd6a8a58016d338329d373c3a6df241703aaef27d7aa67a34cd40c2e785d48f5c61d2bb1ccf04629a3
7
- data.tar.gz: e778686e7bca832f2a6acca93c4d3065e5084428dbdd391c419fbcad3abdf03656606b5082d0eb045c54249ceeda76d71a4906f0ddd43b9a895b06d4934df608
6
+ metadata.gz: 816221a751eb7186ab7a885103662adbda249ad6f9753d3e820466d243171f51f4af40ee94fad1d83c152120914921901b60d23114db0fb79f07da00075ffe9e
7
+ data.tar.gz: 051d85e6f05557d9093f83d2bce755b878e6481020a3a3cbf8cb6eafa07fd6fb5537a63d07688cf48b3234073aff60712e48ece85f4c50ff2e77569f0a076008
@@ -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
- - Run `docker run -it --rm outstand/consul_stockpile:latest bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
33
- - Run `docker build -t outstand/consul_stockpile:VERSION -f Dockerfile.release .`
34
- - Run `docker push outstand/consul_stockpile:VERSION`
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 }
@@ -1,3 +1,3 @@
1
1
  module ConsulStockpile
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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 00:00:00.000000000 Z
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