Skip to content

Commit e25144e

Browse files
authored
Merge branch 'master' into cri-containerd-dave
2 parents d0492d2 + 9ab0142 commit e25144e

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

spec/acceptance/nodesets/pooler/centos7.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ HOSTS:
22
centos7:
33
roles:
44
- default
5-
platform: el7-x86_64
5+
platform: el-7-x86_64
66
hypervisor: vmpooler
77
template: Delivery/Quality Assurance/Templates/vCloud/centos-7-x86_64
88
CONFIG:

spec/spec_helper_acceptance.rb

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
# shell('echo "#{vmhostname}" > /etc/hostname')
4646
# shell("hostname #{vmhostname}")
4747
hosts_file = <<-EOS
48-
127.0.0.1 #{vmhostname}
48+
127.0.0.1 localhost #{vmhostname} kubernetes
4949
#{vmipaddr} #{vmhostname}
5050
#{vmipaddr} kubernetes
5151
EOS
@@ -88,19 +88,31 @@
8888
selector:
8989
run: my-nginx
9090
EOS
91-
# Return ip adress
91+
if fact('osfamily') == 'Debian'
92+
#Installing rubydev environment
93+
on(host, "apt install ruby-bundler --yes", acceptable_exit_codes: [0]).stdout
94+
on(host, "apt-get install ruby-dev --yes", acceptable_exit_codes: [0]).stdout
95+
on(host, "apt-get install build-essential curl git m4 python-setuptools ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev --yes", acceptable_exit_codes: [0]).stdout
96+
end
97+
if fact('osfamily') == 'RedHat'
98+
#Installing rubydev environment
99+
on(host, "yum install -y ruby-devel git zlib-devel gcc-c++ lib yaml-devel libffi-devel make bzip2 libtool curl openssl-devel readline-devel", acceptable_exit_codes: [0]).stdout
100+
on(host, "gem install bundler", acceptable_exit_codes: [0]).stdout
101+
on(host, "git clone git://github.com/sstephenson/rbenv.git .rbenv", acceptable_exit_codes: [0]).stdout
102+
on(host, "echo 'export PATH=\"$HOME/.rbenv/bin:$PATH\"' >> ~/.bash_profile", acceptable_exit_codes: [0]).stdout
103+
on(host, "echo 'eval \"$(rbenv init -)\"' >> ~/.bash_profile" ,acceptable_exit_codes: [0]).stdout
104+
on(host, "git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build", acceptable_exit_codes: [0]).stdout
105+
on(host, "echo 'export PATH=\"$HOME/.rbenv/plugins/ruby-build/bin:$PATH\"' >> ~/.bash_profile", acceptable_exit_codes: [0]).stdout
106+
on(host, "source ~/.bash_profile;rbenv install -v 2.3.1;rbenv global 2.3.1;rbenv local 2.3.1", acceptable_exit_codes: [0]).stdout
107+
end
108+
92109
# Installing go, cfssl
110+
on(host, "cd /etc/puppetlabs/code/modules/kubernetes;rm -rf Gemfile.lock;bundle install --path vendor/bundle", acceptable_exit_codes: [0]).stdout
93111
on(host, "curl -o go.tar.gz https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz", acceptable_exit_codes: [0]).stdout
94112
on(host, "tar -C /usr/local -xzf go.tar.gz", acceptable_exit_codes: [0]).stdout
95-
on(host, "apt-get install git -y", acceptable_exit_codes: [0]).stdout
96113
on(host, "export PATH=$PATH:/usr/local/go/bin;go get -u github.com/cloudflare/cfssl/cmd/...", acceptable_exit_codes: [0]).stdout
97-
#Installing rubydev environment
98-
on(host, "apt install ruby-bundler --yes", acceptable_exit_codes: [0]).stdout
99-
on(host, "apt-get install ruby-dev --yes", acceptable_exit_codes: [0]).stdout
100-
on(host, "apt-get install build-essential curl git m4 python-setuptools ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev --yes", acceptable_exit_codes: [0]).stdout
101-
on(host, "cd /etc/puppetlabs/code/modules/kubernetes;rm -rf Gemfile.lock;bundle install --path vendor/bundle", acceptable_exit_codes: [0]).stdout
102114
# Creating certs
103-
on(host, "export PATH=$PATH:/usr/local/go/bin;export PATH=$PATH:/root/go/bin;cd /etc/puppetlabs/code/modules/kubernetes/tooling;./kube_tool.rb -o #{os} -v 1.8.5 -r docker -f kubernetes -i #{vmipaddr} -b #{vmipaddr} -e \"etcd-#{vmhostname}=http://#{vmipaddr}:2380\" -t \"#{vmipaddr}\" -a \"#{vmipaddr}\" -d true", acceptable_exit_codes: [0]).stdout
115+
on(host, "source ~/.bash_profile;rbenv global 2.3.1;rbenv local 2.3.1;export PATH=$PATH:/usr/local/go/bin;export PATH=$PATH:/root/go/bin;cd /etc/puppetlabs/code/modules/kubernetes/tooling;./kube_tool.rb -o #{os} -v 1.8.5 -r docker -f kubernetes -i #{vmipaddr} -b #{vmipaddr} -e \"etcd-#{vmhostname}=http://#{vmipaddr}:2380\" -t \"#{vmipaddr}\" -a \"#{vmipaddr}\" -d true", acceptable_exit_codes: [0]).stdout
104116
create_remote_file(host, "/etc/hosts", hosts_file)
105117
create_remote_file(host, "/tmp/nginx.yml", nginx)
106118
on(host, 'cp /etc/puppetlabs/code/modules/kubernetes/tooling/kubernetes.yaml /etc/puppetlabs/code/environments/production/hieradata/common.yaml', acceptable_exit_codes: [0]).stdout

0 commit comments

Comments
 (0)