itamae-plugin-recipe-consul 0.1.2 → 0.1.5

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
- SHA1:
3
- metadata.gz: 0a4e25dae562c05a16432fc72342702646f28f14
4
- data.tar.gz: 149b7a50dd2a66732b918b801616e119ecfe3599
2
+ SHA256:
3
+ metadata.gz: 0c9f3f64a2a1c656572b41f18d9761fe188ddbfa9d8ffbc7e049f2188353b6e7
4
+ data.tar.gz: 3c606a7e9a5342b0e2d882bec52a250b702ca0fccd76f06301797ddad9a7fc3b
5
5
  SHA512:
6
- metadata.gz: 35537aead72a0135a0bf16bf41ea0b9f7c2e33c3c6e15fe9b0b8a8229d5a98777f7262eac325f78061869ab7c8115da4a1c6a0c69f89d1dbbe514d8cff608916
7
- data.tar.gz: 52005f30a26030930223be18a58a22d468bfec26e181a97a0afb04b901cc19da74fb5723e63d171172b9a0689c75639b8224a45ab661c0eb1a671efb72a3047e
6
+ metadata.gz: 5e2295733b36874f90da2685ef977f8a1d79c31214bd28b5f32f13871abd416a605c400b63618225c069801467b5df34dcd4045185586292fc572855cb9587fb
7
+ data.tar.gz: 0d3dd7436d0d476da1189821d899652ca68e8a273f4048e90115c4338580e9e4235422f079adf00ed0e55f4ff0c65707d2a2f38c668cdb94a0ad77519538b490
@@ -0,0 +1,113 @@
1
+ name: test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ types:
9
+ - opened
10
+ - synchronize
11
+ - reopened
12
+ schedule:
13
+ - cron: "0 10 * * 5" # JST 19:00 (Fri)
14
+
15
+ env:
16
+ CI: "true"
17
+
18
+ jobs:
19
+ test:
20
+ runs-on: ubuntu-latest
21
+
22
+ strategy:
23
+ fail-fast: false
24
+
25
+ matrix:
26
+ ruby:
27
+ - 2.3
28
+ image:
29
+ - centos:7
30
+ - centos:8
31
+ - debian:jessie
32
+ - debian:stretch
33
+ - debian:buster
34
+
35
+ steps:
36
+ - uses: actions/checkout@v2
37
+
38
+ - uses: eregon/use-ruby-action@v1
39
+ with:
40
+ ruby-version: ${{ matrix.ruby }}
41
+
42
+ - name: Cache vendor/bundle
43
+ uses: actions/cache@v1
44
+ id: cache_gem
45
+ with:
46
+ path: vendor/bundle
47
+ key: v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ github.sha }}
48
+ restore-keys: |
49
+ v1-gem-${{ runner.os }}-${{ matrix.ruby }}-
50
+
51
+ - name: bundle update
52
+ run: |
53
+ set -xe
54
+ bundle config path vendor/bundle
55
+ bundle update --jobs $(nproc) --retry 3
56
+
57
+ - name: Start container
58
+ run: |
59
+ set -xe
60
+
61
+ case "$IMAGE" in
62
+ "debian:stretch" | "debian:buster" )
63
+ docker run --name tmp-debian $IMAGE bash -c "apt-get update && apt-get install -y systemd-sysv"
64
+ docker commit tmp-debian debian-with-systemd
65
+ docker run --privileged -d --name container-with-service debian-with-systemd /sbin/init
66
+ ;;
67
+ *)
68
+ docker run --privileged -d --name container-with-service $IMAGE /sbin/init
69
+ ;;
70
+ esac
71
+ env:
72
+ IMAGE: ${{ matrix.image }}
73
+
74
+ - name: Run Itamae
75
+ run: |
76
+ set -xe
77
+ bundle exec itamae docker --node-yaml=recipes/node.yml recipes/install.rb --container=container-with-service --tag itamae-plugin:latest
78
+
79
+ - name: Run Serverspec
80
+ run: |
81
+ set -xe
82
+ bundle exec rspec
83
+ env:
84
+ DOCKER_CONTAINER: container-with-service
85
+
86
+ - name: Slack Notification (not success)
87
+ uses: lazy-actions/slatify@master
88
+ if: "! success()"
89
+ continue-on-error: true
90
+ with:
91
+ job_name: ${{ format('*build* ({0}, {1})', matrix.ruby, matrix.image) }}
92
+ type: ${{ job.status }}
93
+ icon_emoji: ":octocat:"
94
+ url: ${{ secrets.SLACK_WEBHOOK }}
95
+ token: ${{ secrets.GITHUB_TOKEN }}
96
+
97
+ notify:
98
+ needs:
99
+ - test
100
+
101
+ runs-on: ubuntu-latest
102
+
103
+ steps:
104
+ - name: Slack Notification (success)
105
+ uses: lazy-actions/slatify@master
106
+ if: always()
107
+ continue-on-error: true
108
+ with:
109
+ job_name: '*build*'
110
+ type: ${{ job.status }}
111
+ icon_emoji: ":octocat:"
112
+ url: ${{ secrets.SLACK_WEBHOOK }}
113
+ token: ${{ secrets.GITHUB_TOKEN }}
data/.gitignore CHANGED
@@ -7,4 +7,3 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- .vagrant/
data/CHANGELOG.md CHANGED
@@ -1,24 +1,72 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.1.5](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.5) (2021-11-20)
4
+
5
+ [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.4...v0.1.5)
6
+
7
+ * Enable MFA requirement for gem releasing
8
+ * https://github.com/sue445/itamae-plugin-recipe-consul/pull/38
9
+
10
+ ## [v0.1.4](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.4) (2019-03-29)
11
+
12
+ [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.3...v0.1.4)
13
+
14
+ **Merged pull requests:**
15
+
16
+ - Added unzip option to overwrite consul binary [\#23](https://github.com/sue445/itamae-plugin-recipe-consul/pull/23) ([varusan](https://github.com/varusan))
17
+ - Fix CI for bundler v2 [\#22](https://github.com/sue445/itamae-plugin-recipe-consul/pull/22) ([sue445](https://github.com/sue445))
18
+ - Dockerlize [\#21](https://github.com/sue445/itamae-plugin-recipe-consul/pull/21) ([sue445](https://github.com/sue445))
19
+ - Drop CentOS 6.5 [\#20](https://github.com/sue445/itamae-plugin-recipe-consul/pull/20) ([sue445](https://github.com/sue445))
20
+ - centos70 -\> 7 [\#19](https://github.com/sue445/itamae-plugin-recipe-consul/pull/19) ([sue445](https://github.com/sue445))
21
+ - Update CI image [\#18](https://github.com/sue445/itamae-plugin-recipe-consul/pull/18) ([sue445](https://github.com/sue445))
22
+
23
+ ## [v0.1.3](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.3) (2016-10-05)
24
+ [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.3.beta1...v0.1.3)
25
+
26
+ **Merged pull requests:**
27
+
28
+ - \[CI\] Migrate to workflow [\#17](https://github.com/sue445/itamae-plugin-recipe-consul/pull/17) ([sue445](https://github.com/sue445))
29
+ - \[CI\] refactor [\#16](https://github.com/sue445/itamae-plugin-recipe-consul/pull/16) ([sue445](https://github.com/sue445))
30
+ - \[CI\] Migrate to container [\#15](https://github.com/sue445/itamae-plugin-recipe-consul/pull/15) ([sue445](https://github.com/sue445))
31
+ - Update box [\#14](https://github.com/sue445/itamae-plugin-recipe-consul/pull/14) ([sue445](https://github.com/sue445))
32
+ - Add service\_actions to node [\#13](https://github.com/sue445/itamae-plugin-recipe-consul/pull/13) ([sue445](https://github.com/sue445))
33
+
34
+ ## [v0.1.3.beta1](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.3.beta1) (2016-07-06)
35
+ [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.2...v0.1.3.beta1)
36
+
37
+ ## [v0.1.2](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.2) (2016-05-19)
38
+ [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.1...v0.1.2)
39
+
40
+ **Implemented enhancements:**
41
+
42
+ - Restart consul when environment file is updated [\#12](https://github.com/sue445/itamae-plugin-recipe-consul/pull/12) ([sue445](https://github.com/sue445))
43
+
44
+ **Merged pull requests:**
45
+
46
+ - Refactor: Remove unused resource [\#11](https://github.com/sue445/itamae-plugin-recipe-consul/pull/11) ([sue445](https://github.com/sue445))
47
+
3
48
  ## [v0.1.1](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.1) (2016-05-19)
4
49
  [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.0...v0.1.1)
5
50
 
51
+ **Implemented enhancements:**
52
+
53
+ - Remove needless systemctl daemon-reload [\#9](https://github.com/sue445/itamae-plugin-recipe-consul/pull/9) ([sue445](https://github.com/sue445))
54
+
6
55
  **Merged pull requests:**
7
56
 
8
57
  - Refactor: Use absolute path instead of relative path [\#10](https://github.com/sue445/itamae-plugin-recipe-consul/pull/10) ([sue445](https://github.com/sue445))
9
- - Remove needless systemctl daemon-reload [\#9](https://github.com/sue445/itamae-plugin-recipe-consul/pull/9) ([sue445](https://github.com/sue445))
10
58
 
11
59
  ## [v0.1.0](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.0) (2016-05-18)
12
60
  [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.0.beta3...v0.1.0)
13
61
 
14
- **Merged pull requests:**
62
+ **Implemented enhancements:**
15
63
 
16
64
  - Add platform to node [\#8](https://github.com/sue445/itamae-plugin-recipe-consul/pull/8) ([sue445](https://github.com/sue445))
17
65
 
18
66
  ## [v0.1.0.beta3](https://github.com/sue445/itamae-plugin-recipe-consul/tree/v0.1.0.beta3) (2016-05-09)
19
67
  [Full Changelog](https://github.com/sue445/itamae-plugin-recipe-consul/compare/v0.1.0.beta2...v0.1.0.beta3)
20
68
 
21
- **Merged pull requests:**
69
+ **Implemented enhancements:**
22
70
 
23
71
  - Set mode 644 to file [\#7](https://github.com/sue445/itamae-plugin-recipe-consul/pull/7) ([sue445](https://github.com/sue445))
24
72
 
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://github.com/sue445/itamae-plugin-recipe-consul/workflows/test/badge.svg?branch=master)](https://github.com/sue445/itamae-plugin-recipe-consul/actions?query=workflow%3Atest)
9
7
 
10
8
  ## Supported
11
9
  * CentOS 6 (init.d)
@@ -71,6 +69,13 @@ consul:
71
69
  options: "-server -bootstrap-expect 1"
72
70
 
73
71
  gomaxprocs: 2
72
+
73
+ # consul service actions when after install (default: enable, start)
74
+ service_actions:
75
+ - enable
76
+ - start
77
+ # - disable
78
+ # - stop
74
79
  ```
75
80
 
76
81
  ## Development
@@ -80,18 +85,16 @@ After checking out the repo, run `bin/setup` to install dependencies. You can al
80
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).
81
86
 
82
87
  ## Testing
83
- requirements [Vagrant](https://www.vagrantup.com/)
88
+ requirements [Docker](https://www.docker.com/)
84
89
 
85
90
  e.g) test on CentOS 7.0
86
91
 
87
92
  ```sh
88
- vagrant up centos70
89
- bundle exec rake itamae:centos70
90
- 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
91
96
  ```
92
97
 
93
- Avairable hosts are defined in [Vagrantfile](Vagrantfile) and [Rakefile](Rakefile)
94
-
95
98
  ## Contributing
96
99
 
97
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 "bundle exec itamae ssh --host=#{host} --vagrant --node-yaml=recipes/node.yml recipes/install.rb"
28
- end
29
- end
30
- end
@@ -14,6 +14,11 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = "https://github.com/sue445/itamae-plugin-recipe-consul"
15
15
  spec.license = "MIT"
16
16
 
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = spec.homepage
19
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
20
+ spec.metadata["rubygems_mfa_required"] = "true"
21
+
17
22
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
23
  spec.bindir = "exe"
19
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
@@ -22,7 +27,7 @@ Gem::Specification.new do |spec|
22
27
  spec.add_dependency "itamae"
23
28
 
24
29
  spec.add_development_dependency "bundler"
25
- spec.add_development_dependency "paraduct"
26
- spec.add_development_dependency "rake", "~> 10.0"
30
+ spec.add_development_dependency "docker-api"
31
+ spec.add_development_dependency "rake"
27
32
  spec.add_development_dependency "serverspec"
28
33
  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
@@ -0,0 +1,3 @@
1
+ service "consul" do
2
+ action node[:consul][:service_actions]
3
+ end
@@ -4,6 +4,4 @@ else
4
4
  set_consul_initd_script "/etc/sysconfig/consul"
5
5
  end
6
6
 
7
- service "consul" do
8
- action [:enable, :start]
9
- end
7
+ include_recipe "consul::service::action"
@@ -1,7 +1,5 @@
1
1
  if node[:platform_version].to_i >= 8
2
2
  set_consul_systemd_unit "/etc/default/consul"
3
3
 
4
- service "consul" do
5
- action [:enable, :start]
6
- end
4
+ include_recipe "consul::service::action"
7
5
  end
@@ -15,5 +15,8 @@ node.reverse_merge!(
15
15
  bin_dir: "/usr/local/bin",
16
16
  data_dir: "/tmp/consul",
17
17
  gomaxprocs: 2,
18
+ service_actions: [:enable, :start]
18
19
  },
19
20
  )
21
+
22
+ node[:consul][:service_actions] ||= []
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Consul
5
- VERSION = "0.1.2"
5
+ VERSION = "0.1.5"
6
6
  end
7
7
  end
8
8
  end
data/recipes/install.rb CHANGED
@@ -1 +1,8 @@
1
+ case node[:platform]
2
+ when "debian", "ubuntu"
3
+ execute "apt-get update"
4
+ end
5
+
6
+ directory "/tmp/itamae_tmp"
7
+
1
8
  include_recipe "consul"
data/recipes/node.yml CHANGED
@@ -6,3 +6,6 @@ consul:
6
6
  data_dir: "/tmp/consul"
7
7
  gomaxprocs: 2
8
8
  options: "-server -bootstrap-expect 1"
9
+ service_actions:
10
+ - enable
11
+ - start
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.2
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2021-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itamae
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: paraduct
42
+ name: docker-api
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: serverspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -87,23 +87,22 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - ".github/workflows/test.yml"
90
91
  - ".gitignore"
91
- - ".paraduct.yml"
92
92
  - ".rspec"
93
93
  - CHANGELOG.md
94
94
  - Gemfile
95
95
  - LICENSE.txt
96
96
  - README.md
97
97
  - Rakefile
98
- - Vagrantfile
99
98
  - bin/console
100
99
  - bin/setup
101
- - ci/build.sh
102
100
  - itamae-plugin-recipe-consul.gemspec
103
101
  - lib/itamae/plugin/recipe/consul.rb
104
102
  - lib/itamae/plugin/recipe/consul/default.rb
105
103
  - lib/itamae/plugin/recipe/consul/install.rb
106
104
  - lib/itamae/plugin/recipe/consul/service.rb
105
+ - lib/itamae/plugin/recipe/consul/service/action.rb
107
106
  - lib/itamae/plugin/recipe/consul/service/centos.rb
108
107
  - lib/itamae/plugin/recipe/consul/service/debian.rb
109
108
  - lib/itamae/plugin/recipe/consul/service/definitions.rb
@@ -113,12 +112,15 @@ files:
113
112
  - lib/itamae/plugin/recipe/consul/version.rb
114
113
  - recipes/install.rb
115
114
  - recipes/node.yml
116
- - wercker.yml
117
115
  homepage: https://github.com/sue445/itamae-plugin-recipe-consul
118
116
  licenses:
119
117
  - MIT
120
- metadata: {}
121
- post_install_message:
118
+ metadata:
119
+ homepage_uri: https://github.com/sue445/itamae-plugin-recipe-consul
120
+ source_code_uri: https://github.com/sue445/itamae-plugin-recipe-consul
121
+ changelog_uri: https://github.com/sue445/itamae-plugin-recipe-consul/blob/master/CHANGELOG.md
122
+ rubygems_mfa_required: 'true'
123
+ post_install_message:
122
124
  rdoc_options: []
123
125
  require_paths:
124
126
  - lib
@@ -133,9 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
135
  - !ruby/object:Gem::Version
134
136
  version: '0'
135
137
  requirements: []
136
- rubyforge_project:
137
- rubygems_version: 2.5.1
138
- signing_key:
138
+ rubygems_version: 3.2.22
139
+ signing_key:
139
140
  specification_version: 4
140
141
  summary: Itamae plugin to install Consul with init scripts
141
142
  test_files: []
data/.paraduct.yml DELETED
@@ -1,10 +0,0 @@
1
- script: |-
2
- ./ci/build.sh ${HOST}
3
- after_script: |-
4
- vagrant destroy -f $HOST
5
- variables:
6
- HOST:
7
- - centos65
8
- - centos70
9
- - debian8
10
- max_threads: 4
data/Vagrantfile DELETED
@@ -1,114 +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
- provider.ssh_key_name = "wercker-#{ENV['WERCKER_GIT_REPOSITORY']}"
18
- override.ssh.private_key_path = "~/.ssh/id_rsa.vagrant"
19
- else
20
- provider.ssh_key_name = "local"
21
- override.ssh.private_key_path = "~/.ssh/id_rsa"
22
- end
23
- end
24
-
25
- config.vm.define :centos65 do |c|
26
- c.vm.box = "puphpet/centos65-x64"
27
- c.vm.provider :digital_ocean do |provider, override|
28
- provider.image = "centos-6-5-x64"
29
- end
30
- c.vm.hostname = 'itamae-centos65'
31
- c.vm.hostname += "-#{ENV['WERCKER_BUILD_ID']}" if ENV['WERCKER_BUILD_ID']
32
- end
33
-
34
- config.vm.define :centos70 do |c|
35
- c.vm.box = "centos/7"
36
- c.vm.provider :digital_ocean do |provider, override|
37
- provider.image = "centos-7-0-x64"
38
- end
39
- c.vm.hostname = 'itamae-centos70'
40
- c.vm.hostname += "-#{ENV['WERCKER_BUILD_ID']}" if ENV['WERCKER_BUILD_ID']
41
- end
42
-
43
- config.vm.define :debian8 do |c|
44
- c.vm.box = "debian/jessie64"
45
- c.vm.provider :digital_ocean do |provider, override|
46
- provider.image = "debian-8-x64"
47
- end
48
- c.vm.hostname = 'itamae-debian8'
49
- c.vm.hostname += "-#{ENV['WERCKER_BUILD_ID']}" if ENV['WERCKER_BUILD_ID']
50
- end
51
-
52
- # The most common configuration options are documented and commented below.
53
- # For a complete reference, please see the online documentation at
54
- # https://docs.vagrantup.com.
55
-
56
- # Every Vagrant development environment requires a box. You can search for
57
- # boxes at https://atlas.hashicorp.com/search.
58
- # config.vm.box = "base"
59
-
60
- # Disable automatic box update checking. If you disable this, then
61
- # boxes will only be checked for updates when the user runs
62
- # `vagrant box outdated`. This is not recommended.
63
- # config.vm.box_check_update = false
64
-
65
- # Create a forwarded port mapping which allows access to a specific port
66
- # within the machine from a port on the host machine. In the example below,
67
- # accessing "localhost:8080" will access port 80 on the guest machine.
68
- # config.vm.network "forwarded_port", guest: 80, host: 8080
69
-
70
- # Create a private network, which allows host-only access to the machine
71
- # using a specific IP.
72
- # config.vm.network "private_network", ip: "192.168.33.10"
73
-
74
- # Create a public network, which generally matched to bridged network.
75
- # Bridged networks make the machine appear as another physical device on
76
- # your network.
77
- # config.vm.network "public_network"
78
-
79
- # Share an additional folder to the guest VM. The first argument is
80
- # the path on the host to the actual folder. The second argument is
81
- # the path on the guest to mount the folder. And the optional third
82
- # argument is a set of non-required options.
83
- # config.vm.synced_folder "../data", "/vagrant_data"
84
-
85
- # Provider-specific configuration so you can fine-tune various
86
- # backing providers for Vagrant. These expose provider-specific options.
87
- # Example for VirtualBox:
88
- #
89
- # config.vm.provider "virtualbox" do |vb|
90
- # # Display the VirtualBox GUI when booting the machine
91
- # vb.gui = true
92
- #
93
- # # Customize the amount of memory on the VM:
94
- # vb.memory = "1024"
95
- # end
96
- #
97
- # View the documentation for the provider you are using for more
98
- # information on available options.
99
-
100
- # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
101
- # such as FTP and Heroku are also available. See the documentation at
102
- # https://docs.vagrantup.com/v2/push/atlas.html for more information.
103
- # config.push.define "atlas" do |push|
104
- # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
105
- # end
106
-
107
- # Enable provisioning with a shell script. Additional provisioners such as
108
- # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
109
- # documentation for more information about their specific syntax and use.
110
- # config.vm.provision "shell", inline: <<-SHELL
111
- # sudo apt-get update
112
- # sudo apt-get install -y apache2
113
- # SHELL
114
- end
data/ci/build.sh DELETED
@@ -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
data/wercker.yml DELETED
@@ -1,70 +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: sue445/rvm-vagrant-digitalocean@1.0.0
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
- # This is the build pipeline. Pipelines are the core of wercker
17
- # Read more about pipelines on our dev center
18
- # http://devcenter.wercker.com/docs/pipelines/index.html
19
- build:
20
- # Steps make up the actions in your pipeline
21
- # Read more about steps on our dev center:
22
- # http://devcenter.wercker.com/docs/steps/index.html
23
- steps:
24
- - rvm-use:
25
- version: 2.3.0
26
-
27
- - script:
28
- name: install bundler
29
- code: gem install bundler -v 1.10.6 --no-document
30
-
31
- - bundle-install:
32
- jobs: 4
33
-
34
- - script:
35
- name: echo ruby information
36
- code: |
37
- echo "ruby version $(ruby --version) running"
38
- echo "from location $(which ruby)"
39
- echo -p "gem list: $(gem list)"
40
-
41
- - script:
42
- name: create .ssh directory
43
- code: mkdir -m 700 -p $HOME/.ssh
44
-
45
- - create-file:
46
- name: put private key
47
- filename: $HOME/.ssh/id_rsa.vagrant
48
- overwrite: true
49
- hide-from-log: true
50
- content: $DIGITALOCEAN_KEY_PRIVATE
51
-
52
- - create-file:
53
- name: put public key
54
- filename: $HOME/.ssh/id_rsa.vagrant.pub
55
- overwrite: true
56
- hide-from-log: true
57
- content: $DIGITALOCEAN_KEY_PUBLIC
58
-
59
- - script:
60
- name: chmod 600 id_rsa
61
- code: chmod 600 $HOME/.ssh/id_rsa.vagrant
62
-
63
- - script:
64
- name: paraduct test
65
- code: bundle exec paraduct test
66
-
67
- after-steps:
68
- - wantedly/pretty-slack-notify:
69
- webhook_url: $SLACK_WEBHOOK_URL
70
- username: wercker_build