Skip to content
This repository was archived by the owner on Jul 28, 2020. It is now read-only.

Commit 009fdbb

Browse files
authored
Merge pull request #70 from StackStorm/build_fix
Build fixes
2 parents cf05132 + 101aca1 commit 009fdbb

21 files changed

Lines changed: 101 additions & 118 deletions

.kitchen.docker.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ platforms:
1818
disable_upstart: false
1919
run_command: /sbin/init
2020
provision_command:
21-
- /usr/bin/apt-get update
22-
- /usr/bin/apt-get install -y apt-transport-https net-tools initscripts
23-
- name: centos-7.2
21+
- /usr/bin/apt-get update && /usr/bin/apt-get install -y apt-transport-https net-tools initscripts libpq5 libpq-dev
22+
- name: centos-7.5
2423
driver:
2524
image: centos:7
2625
platform: rhel
2726
run_command: /usr/lib/systemd/systemd
2827
provision_command:
29-
- /bin/yum install -y initscripts net-tools wget logrotate
28+
- /bin/yum install -y initscripts net-tools wget logrotate postgresql-libs
3029

3130
suites:
3231
- name: default

.kitchen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ verifier:
1313

1414
platforms:
1515
- name: ubuntu-14.04
16-
- name: centos-7.2
16+
- name: centos-7.5
1717

1818
suites:
1919
- name: default

.travis.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
sudo: required
33
services: docker
44

5-
addons:
6-
apt:
7-
sources:
8-
- chef-stable-precise
9-
packages:
10-
- chefdk
11-
125
# Don't `bundle install`
136
install: echo "skip bundle install"
147

@@ -20,11 +13,14 @@ env:
2013
matrix:
2114
- SUITE=default
2215
- SUITE=integration:kitchen:default-ubuntu-1404
23-
- SUITE=integration:kitchen:default-centos-72
16+
- SUITE=integration:kitchen:default-centos-75
2417

2518
before_script:
2619
# https://github.com/zuazo/kitchen-in-travis-native/issues/1#issuecomment-142455888
2720
- sudo iptables -L DOCKER || sudo iptables -N DOCKER
21+
# ChefDK no longer available via APT repo
22+
- wget https://packages.chef.io/files/stable/chefdk/3.2.30/ubuntu/14.04/chefdk_3.2.30-1_amd64.deb
23+
- sudo dpkg -i chefdk_3.2.30-1_amd64.deb
2824
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
2925
- /opt/chefdk/bin/chef gem install kitchen-docker
3026

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# stackstorm cookbook CHANGELOG
22

3+
## 0.5.0
4+
5+
* Migrate from 'mongodb' to 'sc-mongodb' cookbook for Chef 13+ support
6+
* Update test kitchen to CentOS 7.5
7+
* Cleanups and fixes for ST2 2.9 support, and broken Travis builds
8+
39
## 0.4.0
410

511
* Update Test kitchen to CentOS 7.2

attributes/config.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# https://github.com/StackStorm/st2/blob/master/conf/st2.package.conf
66
default['stackstorm']['config'] = {
77
api_url: 'http://127.0.0.1:9101',
8-
api_host: '0.0.0.0',
8+
api_host: '127.0.0.1',
99
api_port: 9101,
1010
api_mask_secrets: true,
1111
api_allow_origin: '*',
1212

13-
auth_host: '0.0.0.0',
13+
auth_host: '127.0.0.1',
1414
auth_port: 9100,
1515
auth_use_ssl: false,
1616
auth_debug: false,
@@ -26,7 +26,7 @@
2626
log_mask_secrets: true,
2727

2828
system_user: node['stackstorm']['user']['user'],
29-
ssh_key_file: "#{node['stackstorm']['user']['home']}/.ssh/id_rsa",
29+
ssh_key_file: "#{node['stackstorm']['user']['home']}/.ssh/stanley_rsa",
3030

3131
rmq_host: '127.0.0.1',
3232
rmq_vhost: nil,

metadata.rb

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,25 @@
44
license 'Apache-2.0'
55
description 'Installs/Configures stackstorm'
66
long_description 'Installs/Configures stackstorm'
7-
version '0.4.0'
7+
version '0.5.0'
88

99
supports 'ubuntu', '= 14.04'
10-
supports 'redhat', '~> 7.0'
11-
supports 'centos', '~> 7.0'
10+
supports 'redhat', '~> 7.5'
11+
supports 'centos', '~> 7.5'
1212
supports 'amazon'
1313

14-
chef_version '>= 12.4'
14+
chef_version '>= 14.4'
1515

1616
depends 'apt'
1717
depends 'chef_nginx', '~> 5.0.1'
1818
depends 'database'
1919
depends 'htpasswd'
20-
depends 'mongodb3', '~> 5.3.0'
20+
depends 'sc-mongodb', '~> 1.2.0'
2121
depends 'openssl', '~> 6.0.0'
2222
depends 'openstack-mistral', '>= 0.3.0'
2323
depends 'packagecloud'
24-
depends 'postgresql'
25-
# For newer RabbitMQ cookbook versions, service fails to start in Dockerized environment under EL7
26-
# See: https://github.com/StackStorm/chef-stackstorm/pull/62
27-
depends 'rabbitmq', '<= 4.10.0'
28-
depends 'sudo'
24+
depends 'postgresql', '=6.1.1'
25+
depends 'rabbitmq'
2926
depends 'yum'
3027
depends 'yum-epel'
3128

recipes/_repository.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,6 @@
1414
'deb'
1515
end
1616

17-
# Read:
18-
# http://blog.packagecloud.io/eng/2016/03/21/apt-hash-sum-mismatch/
19-
# https://packagecloud.io/computology/apt-backport
20-
package 'apt' do
21-
version '1.2.10'
22-
action :nothing
23-
end
24-
25-
execute 'Ubuntu Precise and Trusty: APT hash sum mismatch workaround' do
26-
command 'curl -s https://packagecloud.io/install/repositories/computology/apt-backport/script.deb.sh | bash'
27-
only_if { node['platform'] == 'ubuntu' }
28-
only_if { %w(trusty precise).include? node['lsb']['codename'] }
29-
creates '/etc/apt/sources.list.d/computology_apt-backport.list'
30-
notifies :install, 'package[apt]', :immediately
31-
end
32-
3317
packagecloud_repo 'StackStorm/stable' do
3418
type type
3519
end

recipes/_services.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
st2actionrunner st2api st2stream
1212
st2auth st2garbagecollector st2notifier
1313
st2resultstracker st2rulesengine st2sensorcontainer
14+
st2timersengine st2workflowengine
1415
).freeze
1516

1617
# Enable & Start st2 services

recipes/bundle.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,13 @@
4141
node.default['stackstorm']['user']['ssh_pub'] = pubkey
4242
node.default['stackstorm']['user']['ssh_key'] = prikey
4343
node.default['stackstorm']['user']['authorized_keys'] = [pubkey]
44+
node.default['mongodb']['package_version'] = '3.4.17'
45+
node.default['postgresql']['pg_gem']['version'] = '0.21.0'
46+
node.override['htpasswd']['install_method'] = 'ruby'
47+
node.override['rabbitmq']['use_distro_version'] = true
4448

45-
include_recipe 'mongodb3::default'
49+
include_recipe 'htpasswd::default'
50+
include_recipe 'sc-mongodb::default'
4651
include_recipe 'rabbitmq::default'
4752
include_recipe 'stackstorm::default'
4853
include_recipe 'stackstorm::mistral'

recipes/user.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,26 @@
3333
if conf['ssh_key'].nil?
3434
# Ensure to generate ssh credentials if none is given.
3535
execute "generating ssh key-pair for #{conf['user']}" do
36-
command "ssh-keygen -f #{conf['home']}/.ssh/id_rsa -b #{conf['ssh_key_bits']} -P ''"
36+
command "ssh-keygen -f #{conf['home']}/.ssh/stanley_rsa -b #{conf['ssh_key_bits']} -P ''"
3737
user conf['user']
3838
group conf['group']
39-
not_if { ::File.exist? "#{conf['home']}/.ssh/id_rsa" }
39+
not_if { ::File.exist? "#{conf['home']}/.ssh/stanley_rsa" }
4040
only_if { conf['ssh_key'].nil? }
4141
action :run
4242
end
4343
else
4444
# Write supplied credentials
45-
file "creating #{conf['home']}/.ssh/id_rsa key #{conf['user']}" do
46-
path "#{conf['home']}/.ssh/id_rsa"
45+
file "creating #{conf['home']}/.ssh/stanley_rsa key #{conf['user']}" do
46+
path "#{conf['home']}/.ssh/stanley_rsa"
4747
mode 0640
4848
user conf['user']
4949
group conf['group']
5050
content(conf['ssh_key'])
5151
action :create
5252
end
5353

54-
file "creating #{conf['home']}/.ssh/id_rsa public key for #{conf['user']}" do
55-
path "#{conf['home']}/.ssh/id_rsa.pub"
54+
file "creating #{conf['home']}/.ssh/stanley_rsa public key for #{conf['user']}" do
55+
path "#{conf['home']}/.ssh/stanley_rsa.pub"
5656
user conf['user']
5757
group conf['group']
5858
content(conf['ssh_pub'])
@@ -70,7 +70,7 @@
7070
content lazy {
7171
# We make it lazy, because we want self ssh login.
7272
# For example. It's usefull if we deloy a chef node and the clone it :)
73-
mypub = ::IO.read("#{conf['home']}/.ssh/id_rsa.pub")
73+
mypub = ::IO.read("#{conf['home']}/.ssh/stanley_rsa.pub")
7474
pubkeys = conf['authorized_keys'].dup
7575
pubkeys.unshift(mypub) unless pubkeys.include?(mypub)
7676
"# Generated by Chef. Don't edit!\n" << pubkeys.join("\n")
@@ -83,4 +83,5 @@
8383
user conf['user']
8484
nopasswd true
8585
only_if { conf['enable_sudo'] }
86+
action :create
8687
end

0 commit comments

Comments
 (0)