itamae-plugin-recipe-consul 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d69ab6db75c91fa87795e4d910b02e86a5a1db92
4
- data.tar.gz: 72a9eba2ebe31b0ec6955c86f772302c6b1e1b71
2
+ SHA256:
3
+ metadata.gz: e696e3eb11310355191152bffd9628e2556d96bce76895d6dbbef62d1b2fa5a6
4
+ data.tar.gz: cd1d01c5851c933dfabcd59e7d5b3ddd0f05e59a0d28c332ec36d7961a76976f
5
5
  SHA512:
6
- metadata.gz: 64e45d2972b33617b39778d2c38c968f157b6f947c394e53f993189dc1f91278082314682449644d484f28eec5a21331c88b290965dc375566def142a23ca6b7
7
- data.tar.gz: 781e7be854ce73c2c85195dc120d86b99c08992a58f44dfe8410e77c222ea625c778f7df68857c860af32bc8fcdce70791b88571b752430820da73d6e2fc3695
6
+ metadata.gz: a2a65c97992569d060cdc56a6572cb62f3eaada86176bda14e2dc78ee6c48a51cbe7ffb00234fb22cd1dd123e2bf531a4d84ee06e994c4b23eb51cd84205f76a
7
+ data.tar.gz: 814e154186854fa87a53950e68f770d8a8478c395dcc7af0c1b15370728aaf46d6f0757e06a4d2b247b4e307839e6e2e821b6fd509a8883afab52b30c40cb1b8
data/.gitignore CHANGED
@@ -7,4 +7,3 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- .vagrant/
@@ -0,0 +1,26 @@
1
+ language: ruby
2
+ sudo: required
3
+ services:
4
+ - docker
5
+ rvm:
6
+ - 2.3
7
+ env:
8
+ - IMAGE=centos:7
9
+ - IMAGE=debian:jessie
10
+ bundler_args: "--jobs=4"
11
+ cache: bundler
12
+ before_install:
13
+ - travis_retry gem update --system || travis_retry gem update --system 2.7.8
14
+ - travis_retry gem install bundler --no-document || travis_retry gem install bundler --no-document -v 1.17.3
15
+ before_script:
16
+ - docker run --privileged -d --name container-with-service $IMAGE /sbin/init
17
+ script:
18
+ - bundle exec itamae docker --node-yaml=recipes/node.yml recipes/install.rb --container=container-with-service --tag itamae-plugin:latest
19
+ - DOCKER_CONTAINER=container-with-service bundle exec rspec
20
+ branches:
21
+ only:
22
+ - master
23
+ notifications:
24
+ email: false
25
+ slack:
26
+ secure: M93HeWW+fQk+PrzI2mdtnlVkpiMVfQcfujFXl76ly0EtLS3V9p5KKHSyduQ2t7j/KOoRVF+86sEdPZJg16Ha+Y9pVE2oAs7SMv57rT9HaoQtzf5kZo64eCy63+iV+jUZ4U+NitrtNM1vELKyOsSgAq/KJblq9U67Wto3lOsRec7rskwlkjRwqV4TQElqbA1h4oyWyQG0SMKNnmKYV6TFC0/UNjnYLkxNY3btcOB/PYURxfcwbZk9IU+7id2MM4uG8cBVGSjqOglYOWdpWxTCJpZ6YQGdmXsICa38D/Y3crEHLcUAE4DkaPHpTSVdjVm0kvQlUDuLOmHe+Eh4lm6zy8NCMpyO80/C74/OQQdQgDkohKFI8RX/BZnKdQAmZZf8cIdfe4pF4cZGB8mzGcBcpSBApQHEXZyuJF5u9clNW6+Cdo8jtps0c7Nqg3NWebpUCqwiTVR95Dr820sO6wtIlqlNB5AaNpHzefFoxd42pRm5+Ua9rDuoDuRyhVuWcUQCOn9ScqjhsY9q1UIRbgF03ILgDFmFTu/ClaJ7tOtAtE9n7IsibNf87o2Lz+rNQUrIzIZUo7vElrCub0RhgZFy9+sfplHyIR5CBD4y/9Ca6KoB06vzyb3Y7ElXwIifwbGQ3EQZdAWV6V7slVP83+ahHD+K0E+EPLzAqaDum0MkeqI=
@@ -1,5 +1,32 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.1.4](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.4) (2019-03-29)
4
+
5
+ [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.3...v0.1.4)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Added unzip option to overwrite consul binary [\#23](https://github.com/sue445/itamae-plugin-recipe-consul/pull/23) ([varusan](https://github.com/varusan))
10
+ - Fix CI for bundler v2 [\#22](https://github.com/sue445/itamae-plugin-recipe-consul/pull/22) ([sue445](https://github.com/sue445))
11
+ - Dockerlize [\#21](https://github.com/sue445/itamae-plugin-recipe-consul/pull/21) ([sue445](https://github.com/sue445))
12
+ - Drop CentOS 6.5 [\#20](https://github.com/sue445/itamae-plugin-recipe-consul/pull/20) ([sue445](https://github.com/sue445))
13
+ - centos70 -\> 7 [\#19](https://github.com/sue445/itamae-plugin-recipe-consul/pull/19) ([sue445](https://github.com/sue445))
14
+ - Update CI image [\#18](https://github.com/sue445/itamae-plugin-recipe-consul/pull/18) ([sue445](https://github.com/sue445))
15
+
16
+ ## [v0.1.3](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.3) (2016-10-05)
17
+ [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.3.beta1...v0.1.3)
18
+
19
+ **Merged pull requests:**
20
+
21
+ - \[CI\] Migrate to workflow [\#17](https://github.com/sue445/itamae-plugin-recipe-consul/pull/17) ([sue445](https://github.com/sue445))
22
+ - \[CI\] refactor [\#16](https://github.com/sue445/itamae-plugin-recipe-consul/pull/16) ([sue445](https://github.com/sue445))
23
+ - \[CI\] Migrate to container [\#15](https://github.com/sue445/itamae-plugin-recipe-consul/pull/15) ([sue445](https://github.com/sue445))
24
+ - Update box [\#14](https://github.com/sue445/itamae-plugin-recipe-consul/pull/14) ([sue445](https://github.com/sue445))
25
+ - Add service\_actions to node [\#13](https://github.com/sue445/itamae-plugin-recipe-consul/pull/13) ([sue445](https://github.com/sue445))
26
+
27
+ ## [v0.1.3.beta1](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.3.beta1) (2016-07-06)
28
+ [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.2...v0.1.3.beta1)
29
+
3
30
  ## [v0.1.2](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.2) (2016-05-19)
4
31
  [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.1...v0.1.2)
5
32
 
data/README.md CHANGED
@@ -3,9 +3,7 @@
3
3
  Itamae plugin to install [Consul](https://www.consul.io/) with init scripts
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/itamae-plugin-recipe-consul.svg)](https://badge.fury.io/rb/itamae-plugin-recipe-consul)
6
- [![Dependency Status](https://gemnasium.com/badges/github.com/sue445/itamae-plugin-recipe-consul.svg)](https://gemnasium.com/github.com/sue445/itamae-plugin-recipe-consul)
7
-
8
- [![wercker status](https://app.wercker.com/status/1d28d36364b4f79161fc248c6c934072/m/master "wercker status")](https://app.wercker.com/project/bykey/1d28d36364b4f79161fc248c6c934072)
6
+ [![Build Status](https://travis-ci.org/sue445/itamae-plugin-recipe-consul.svg?branch=master)](https://travis-ci.org/sue445/itamae-plugin-recipe-consul)
9
7
 
10
8
  ## Supported
11
9
  * CentOS 6 (init.d)
@@ -87,18 +85,16 @@ After checking out the repo, run `bin/setup` to install dependencies. You can al
87
85
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `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).
88
86
 
89
87
  ## Testing
90
- requirements [Vagrant](https://www.vagrantup.com/)
88
+ requirements [Docker](https://www.docker.com/)
91
89
 
92
90
  e.g) test on CentOS 7.0
93
91
 
94
92
  ```sh
95
- vagrant up centos70
96
- bundle exec rake itamae:centos70
97
- bundle exec rake spec:centos70
93
+ docker run --privileged -d --name container-with-service centos:7 /sbin/init
94
+ bundle exec itamae docker --node-yaml=recipes/node.yml recipes/install.rb --container=container-with-service --tag itamae-plugin:latest
95
+ DOCKER_CONTAINER=container-with-service bundle exec rspec
98
96
  ```
99
97
 
100
- Avairable hosts are defined in [Vagrantfile](Vagrantfile) and [Rakefile](Rakefile)
101
-
102
98
  ## Contributing
103
99
 
104
100
  Bug reports and pull requests are welcome on GitHub at https://github.com/sue445/itamae-plugin-recipe-consul.
data/Rakefile CHANGED
@@ -1,30 +1 @@
1
1
  require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- task :spec => "spec:all"
5
-
6
- HOSTS = %w(centos65 centos70 debian8)
7
-
8
- namespace :spec do
9
- task :all => HOSTS
10
-
11
- HOSTS.each do |host|
12
- desc "Run serverspec to #{host}"
13
- RSpec::Core::RakeTask.new(host.to_sym) do |t|
14
- puts "Running tests to #{host} ..."
15
- ENV["TARGET_HOST"] = host
16
- t.pattern = "spec/**/*_spec.rb"
17
- end
18
- end
19
- end
20
-
21
- namespace :itamae do
22
- task :all => HOSTS
23
-
24
- HOSTS.each do |host|
25
- desc "Run itamae to #{host}"
26
- task host do
27
- sh "itamae ssh --host=#{host} --vagrant --node-yaml=recipes/node.yml recipes/install.rb"
28
- end
29
- end
30
- end
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency "itamae"
23
23
 
24
24
  spec.add_development_dependency "bundler"
25
+ spec.add_development_dependency "docker-api"
25
26
  spec.add_development_dependency "rake", "~> 10.0"
26
27
  spec.add_development_dependency "serverspec"
27
28
  end
@@ -7,6 +7,6 @@ http_request "#{node[:consul][:src_dir]}/#{zip_name}" do
7
7
  url "https://releases.hashicorp.com/consul/#{node[:consul][:version]}/#{zip_name}"
8
8
  end
9
9
 
10
- execute "unzip #{node[:consul][:src_dir]}/#{zip_name} -d #{node[:consul][:bin_dir]}" do
10
+ execute "unzip -o #{node[:consul][:src_dir]}/#{zip_name} -d #{node[:consul][:bin_dir]}" do
11
11
  not_if "#{node[:consul][:bin_dir]}/consul --version | grep #{node[:consul][:version]}"
12
12
  end
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Consul
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
8
8
  end
@@ -1 +1,6 @@
1
+ case node[:platform]
2
+ when "debian", "ubuntu"
3
+ execute "apt-get update"
4
+ end
5
+
1
6
  include_recipe "consul"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-recipe-consul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-05 00:00:00.000000000 Z
11
+ date: 2019-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itamae
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: docker-api
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -75,16 +89,14 @@ extra_rdoc_files: []
75
89
  files:
76
90
  - ".gitignore"
77
91
  - ".rspec"
92
+ - ".travis.yml"
78
93
  - CHANGELOG.md
79
94
  - Gemfile
80
95
  - LICENSE.txt
81
96
  - README.md
82
97
  - Rakefile
83
- - Vagrantfile
84
98
  - bin/console
85
99
  - bin/setup
86
- - ci/build.sh
87
- - ci/setup.sh
88
100
  - itamae-plugin-recipe-consul.gemspec
89
101
  - lib/itamae/plugin/recipe/consul.rb
90
102
  - lib/itamae/plugin/recipe/consul/default.rb
@@ -100,7 +112,6 @@ files:
100
112
  - lib/itamae/plugin/recipe/consul/version.rb
101
113
  - recipes/install.rb
102
114
  - recipes/node.yml
103
- - wercker.yml
104
115
  homepage: https://github.com/sue445/itamae-plugin-recipe-consul
105
116
  licenses:
106
117
  - MIT
@@ -120,8 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
131
  - !ruby/object:Gem::Version
121
132
  version: '0'
122
133
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 2.5.1
134
+ rubygems_version: 3.0.3
125
135
  signing_key:
126
136
  specification_version: 4
127
137
  summary: Itamae plugin to install Consul with init scripts
@@ -1,115 +0,0 @@
1
- # -*- mode: ruby -*-
2
- # vi: set ft=ruby :
3
-
4
- # All Vagrant configuration is done below. The "2" in Vagrant.configure
5
- # configures the configuration version (we support older styles for
6
- # backwards compatibility). Please don't change it unless you know what
7
- # you're doing.
8
- Vagrant.configure(2) do |config|
9
- config.vm.provider :digital_ocean do |provider, override|
10
- override.vm.box = "digital_ocean"
11
- override.vm.box_url = "https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box"
12
- provider.token = ENV["DIGITALOCEAN_ACCESS_TOKEN"]
13
- provider.region = "nyc3"
14
- provider.size = "512MB"
15
-
16
- if ENV["WERCKER"] == "true"
17
- override.vm.synced_folder ".", "/vagrant", disabled: true
18
- provider.ssh_key_name = "wercker-#{ENV['WERCKER_GIT_REPOSITORY']}"
19
- override.ssh.private_key_path = "~/.ssh/id_rsa.vagrant"
20
- else
21
- provider.ssh_key_name = "local"
22
- override.ssh.private_key_path = "~/.ssh/id_rsa"
23
- end
24
- end
25
-
26
- config.vm.define :centos65 do |c|
27
- c.vm.box = "puphpet/centos65-x64"
28
- c.vm.provider :digital_ocean do |provider, override|
29
- provider.image = "centos-6-5-x64"
30
- end
31
- c.vm.hostname = 'itamae-consul-centos65'
32
- c.vm.hostname += "-#{ENV['WERCKER_RUN_ID']}" if ENV['WERCKER_RUN_ID']
33
- end
34
-
35
- config.vm.define :centos70 do |c|
36
- c.vm.box = "centos/7"
37
- c.vm.provider :digital_ocean do |provider, override|
38
- provider.image = "centos-7-0-x64"
39
- end
40
- c.vm.hostname = 'itamae-consul-centos70'
41
- c.vm.hostname += "-#{ENV['WERCKER_RUN_ID']}" if ENV['WERCKER_RUN_ID']
42
- end
43
-
44
- config.vm.define :debian8 do |c|
45
- c.vm.box = "debian/jessie64"
46
- c.vm.provider :digital_ocean do |provider, override|
47
- provider.image = "debian-8-x64"
48
- end
49
- c.vm.hostname = 'itamae-consul-debian8'
50
- c.vm.hostname += "-#{ENV['WERCKER_RUN_ID']}" if ENV['WERCKER_RUN_ID']
51
- end
52
-
53
- # The most common configuration options are documented and commented below.
54
- # For a complete reference, please see the online documentation at
55
- # https://docs.vagrantup.com.
56
-
57
- # Every Vagrant development environment requires a box. You can search for
58
- # boxes at https://atlas.hashicorp.com/search.
59
- # config.vm.box = "base"
60
-
61
- # Disable automatic box update checking. If you disable this, then
62
- # boxes will only be checked for updates when the user runs
63
- # `vagrant box outdated`. This is not recommended.
64
- # config.vm.box_check_update = false
65
-
66
- # Create a forwarded port mapping which allows access to a specific port
67
- # within the machine from a port on the host machine. In the example below,
68
- # accessing "localhost:8080" will access port 80 on the guest machine.
69
- # config.vm.network "forwarded_port", guest: 80, host: 8080
70
-
71
- # Create a private network, which allows host-only access to the machine
72
- # using a specific IP.
73
- # config.vm.network "private_network", ip: "192.168.33.10"
74
-
75
- # Create a public network, which generally matched to bridged network.
76
- # Bridged networks make the machine appear as another physical device on
77
- # your network.
78
- # config.vm.network "public_network"
79
-
80
- # Share an additional folder to the guest VM. The first argument is
81
- # the path on the host to the actual folder. The second argument is
82
- # the path on the guest to mount the folder. And the optional third
83
- # argument is a set of non-required options.
84
- # config.vm.synced_folder "../data", "/vagrant_data"
85
-
86
- # Provider-specific configuration so you can fine-tune various
87
- # backing providers for Vagrant. These expose provider-specific options.
88
- # Example for VirtualBox:
89
- #
90
- # config.vm.provider "virtualbox" do |vb|
91
- # # Display the VirtualBox GUI when booting the machine
92
- # vb.gui = true
93
- #
94
- # # Customize the amount of memory on the VM:
95
- # vb.memory = "1024"
96
- # end
97
- #
98
- # View the documentation for the provider you are using for more
99
- # information on available options.
100
-
101
- # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
102
- # such as FTP and Heroku are also available. See the documentation at
103
- # https://docs.vagrantup.com/v2/push/atlas.html for more information.
104
- # config.push.define "atlas" do |push|
105
- # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
106
- # end
107
-
108
- # Enable provisioning with a shell script. Additional provisioners such as
109
- # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
110
- # documentation for more information about their specific syntax and use.
111
- # config.vm.provision "shell", inline: <<-SHELL
112
- # sudo apt-get update
113
- # sudo apt-get install -y apache2
114
- # SHELL
115
- end
@@ -1,7 +0,0 @@
1
- #!/bin/bash -xe
2
-
3
- readonly HOST=$1
4
-
5
- vagrant up $HOST --provider=digital_ocean
6
- bundle exec rake itamae:$HOST
7
- bundle exec rake spec:$HOST
@@ -1,25 +0,0 @@
1
- #!/bin/bash -xe
2
-
3
- wget https://releases.hashicorp.com/vagrant/1.8.4/vagrant_1.8.4_x86_64.rpm
4
- rpm -i vagrant_1.8.4_x86_64.rpm
5
- vagrant plugin install vagrant-digitalocean
6
-
7
- # NOTE: vagrant v1.8.4 depends on bundler v1.12.5
8
- # https://github.com/mitchellh/vagrant/blob/v1.8.4/vagrant.gemspec#L23
9
- gem uninstall bundler --all --force
10
- gem install bundler -v 1.12.5 --no-document
11
-
12
-
13
- mkdir -m 700 -p $HOME/.ssh
14
-
15
- #########################
16
- # put ssh keys
17
- set +x
18
-
19
- echo -e "$DIGITALOCEAN_KEY_PRIVATE" > $HOME/.ssh/id_rsa.vagrant
20
- echo -e "$DIGITALOCEAN_KEY_PUBLIC" > $HOME/.ssh/id_rsa.vagrant.pub
21
-
22
- set -x
23
- #########################
24
-
25
- chmod 600 $HOME/.ssh/id_rsa.vagrant
@@ -1,75 +0,0 @@
1
- # This references the default Ruby container from
2
- # the Docker Hub.
3
- # https://registry.hub.docker.com/_/ruby/
4
- # If you want to use a specific version you would use a tag:
5
- # ruby:2.2.2
6
- box: drecom/centos-ruby:2.3.1
7
- # You can also use services such as databases. Read more on our dev center:
8
- # http://devcenter.wercker.com/docs/services/index.html
9
- # services:
10
- # - postgres
11
- # http://devcenter.wercker.com/docs/services/postgresql.html
12
-
13
- # - mongodb
14
- # http://devcenter.wercker.com/docs/services/mongodb.html
15
-
16
- default: &default
17
- after-steps:
18
- - script:
19
- name: set variables
20
- code: |
21
- # NOTE: override .ruby-version in pretty-slack-notify
22
- export RBENV_VERSION=2.3.1
23
-
24
- - script:
25
- name: remove all vms
26
- code: vagrant destroy -f
27
-
28
- - wantedly/pretty-slack-notify:
29
- webhook_url: $SLACK_WEBHOOK_URL
30
- username: wercker_build
31
-
32
- build:
33
- steps:
34
-
35
- build-centos65:
36
- <<: *default
37
- steps:
38
- - script:
39
- name: setup
40
- code: ./ci/setup.sh
41
-
42
- - bundle-install:
43
- jobs: 4
44
-
45
- - script:
46
- name: build CentOS 6.5
47
- code: ./ci/build.sh centos65
48
-
49
- build-centos70:
50
- <<: *default
51
- steps:
52
- - script:
53
- name: setup
54
- code: ./ci/setup.sh
55
-
56
- - bundle-install:
57
- jobs: 4
58
-
59
- - script:
60
- name: build CentOS 7.0
61
- code: ./ci/build.sh centos70
62
-
63
- build-debian8:
64
- <<: *default
65
- steps:
66
- - script:
67
- name: setup
68
- code: ./ci/setup.sh
69
-
70
- - bundle-install:
71
- jobs: 4
72
-
73
- - script:
74
- name: build Debian 8
75
- code: ./ci/build.sh debian8