blob: 3da420fb271e5b9e80e5f35647b18e937a1c5715 [file] [log] [blame]
Dzmitry Stremkouski7e6d2332018-11-05 12:59:40 +01001#!/bin/bash -xe
2# We do install from sources, as ohaio gem requires ruby2.4+, while Ubuntu xenial has 2.3 only
3# If we want to have yet another ppa instead of sources build, just replase it.
4# TODO(dstremkouski). Check if ppa is applicable here.
5apt update
Dzmitry Stremkouski1f2e2032018-11-05 16:18:20 +01006apt -y install python-pip autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev wget git ruby-dev curl dnsutils rbenv
Dzmitry Stremkouski7e6d2332018-11-05 12:59:40 +01007pip install PyYAML
8pip install virtualenv
9
10git clone https://github.com/rbenv/rbenv.git ~/.rbenv
11echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
12echo 'eval "$(rbenv init -)"' >> ~/.bashrc
13source ~/.bashrc
14type rbenv
15git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
16rbenv install 2.5.0
17rbenv global 2.5.0
18gem install kitchen-openstack
19gem install berkshelf
20gem install bundler
21cat > Gemfile <<EOF
22source 'https://rubygems.org'
23gem 'rake'
24gem 'test-kitchen'
25gem 'kitchen-inspec'
26gem 'inspec'
27gem 'kitchen-salt', :git => 'https://github.com/salt-formulas/kitchen-salt.git'
28EOF
29bundle install