Dzmitry Stremkouski | 7e6d233 | 2018-11-05 12:59:40 +0100 | [diff] [blame] | 1 | #!/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. |
| 5 | apt update |
Dzmitry Stremkouski | 1f2e203 | 2018-11-05 16:18:20 +0100 | [diff] [blame] | 6 | apt -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 Stremkouski | 7e6d233 | 2018-11-05 12:59:40 +0100 | [diff] [blame] | 7 | pip install PyYAML |
| 8 | pip install virtualenv |
| 9 | |
| 10 | git clone https://github.com/rbenv/rbenv.git ~/.rbenv |
| 11 | echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc |
| 12 | echo 'eval "$(rbenv init -)"' >> ~/.bashrc |
| 13 | source ~/.bashrc |
| 14 | type rbenv |
| 15 | git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build |
| 16 | rbenv install 2.5.0 |
| 17 | rbenv global 2.5.0 |
| 18 | gem install kitchen-openstack |
| 19 | gem install berkshelf |
| 20 | gem install bundler |
| 21 | cat > Gemfile <<EOF |
| 22 | source 'https://rubygems.org' |
| 23 | gem 'rake' |
| 24 | gem 'test-kitchen' |
| 25 | gem 'kitchen-inspec' |
| 26 | gem 'inspec' |
| 27 | gem 'kitchen-salt', :git => 'https://github.com/salt-formulas/kitchen-salt.git' |
| 28 | EOF |
| 29 | bundle install |