diff options
author | Jaymala Sinha <jsinha@chef.io> | 2019-06-03 12:20:01 -0400 |
---|---|---|
committer | Jaymala Sinha <jsinha@chef.io> | 2019-06-04 17:12:02 -0400 |
commit | 763aa2ea6f0e76cd0b67a0c78aba085340031901 (patch) | |
tree | 1ec01fde00f6aadc32b192d12590b1b7cf05bbe7 /scripts | |
parent | c75acb8512b290e8531b33787b76789afdfaa435 (diff) | |
download | chef-763aa2ea6f0e76cd0b67a0c78aba085340031901.tar.gz |
Enable All BK verification tests
Signed-off-by: Jaymala Sinha <jsinha@chef.io>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bk_tests/bk_dokken_install.sh | 35 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_install.sh | 2 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_linux_exec.sh | 45 |
3 files changed, 82 insertions, 0 deletions
diff --git a/scripts/bk_tests/bk_dokken_install.sh b/scripts/bk_tests/bk_dokken_install.sh new file mode 100755 index 0000000000..3dd03deecf --- /dev/null +++ b/scripts/bk_tests/bk_dokken_install.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Install omnibus-toolchain for git bundler and gem +curl -fsSL https://chef.io/chef/install.sh | sudo bash -s -- -P omnibus-toolchain + +# Set Environment Variables +export BUNDLE_GEMFILE=$PWD/kitchen-tests/Gemfile +export FORCE_FFI_YAJL=ext +export CHEF_LICENSE="accept-silent" +export PATH=/opt/asdf/bin:/opt/asdf/shims:/opt/omnibus-toolchain/embedded/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +# Install Dev tools +sudo yum install -y gcc gcc-c++ openssl-devel readline-devel zlib-devel iptables +sudo zypper install -y gcc gcc-c++ openssl-devel readline-devel zlib-devel iptables + +# Install ASDF software manager +echo "--- Installing ASDF software version manager from master" +sudo /opt/omnibus-toolchain/embedded/bin/git clone https://github.com/asdf-vm/asdf.git /opt/asdf +. /opt/asdf/asdf.sh +. /opt/asdf/completions/asdf.bash + +echo "--- Installing Ruby ASDF plugin" +/opt/asdf/bin/asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git + +echo "--- Installing Ruby 2.5.5" +/opt/asdf/bin/asdf install ruby 2.5.5 +/opt/asdf/bin/asdf global ruby 2.5.5 + +# Update Gems +gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2) +gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2) --force --no-document +sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) +ruby --version +which bundle +bundle install --jobs=3 --retry=3 --path=vendor/bundle
\ No newline at end of file diff --git a/scripts/bk_tests/bk_install.sh b/scripts/bk_tests/bk_install.sh index de74af151c..e8fefc2d02 100755 --- a/scripts/bk_tests/bk_install.sh +++ b/scripts/bk_tests/bk_install.sh @@ -1,3 +1,5 @@ +apt-get update -y && apt-get install -y net-tools iproute2 +touch /etc/network/interfaces gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2) gem --version gem uninstall bundler -a -x || true diff --git a/scripts/bk_tests/bk_linux_exec.sh b/scripts/bk_tests/bk_linux_exec.sh new file mode 100755 index 0000000000..fee73aa6bb --- /dev/null +++ b/scripts/bk_tests/bk_linux_exec.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# Enable IPv6 in docker +sudo systemctl stop docker +echo "Enabling IPv6 in Docker config" +dockerd_config="/etc/docker/daemon.json" +sudo echo "$(jq '. + {"ipv6": true, "fixed-cidr-v6": "2001:2019:6002::/80", "ip-forward": false}' $dockerd_config)" > $dockerd_config +sudo systemctl start docker + +# Verify Docker Is Running +docker version +sudo service docker status + +# Install C and C++ +sudo yum install -y gcc gcc-c++ openssl-devel readline-devel zlib-devel + +# Install omnibus-toolchain for git bundler and gem +curl -fsSL https://chef.io/chef/install.sh | sudo bash -s -- -P omnibus-toolchain + +# Set Environment Variables +export BUNDLE_GEMFILE=$PWD/kitchen-tests/Gemfile +export FORCE_FFI_YAJL=ext +export CHEF_LICENSE="accept-silent" +export PATH=$PATH:~/.asdf/shims:/opt/asdf/bin:/opt/asdf/shims:/opt/omnibus-toolchain/embedded/bin + +# Install ASDF software manager +echo "--- Installing ASDF software version manager from master" +sudo git clone https://github.com/asdf-vm/asdf.git /opt/asdf +. /opt/asdf/asdf.sh +. /opt/asdf/completions/asdf.bash + +echo "--- Installing Ruby ASDF plugin" +/opt/asdf/bin/asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git + +echo "--- Installing Ruby 2.5.5" +/opt/asdf/bin/asdf install ruby 2.5.5 +/opt/asdf/bin/asdf global ruby 2.5.5 + +# Update Gems +gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2) +gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2) --force --no-document +sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) +ruby --version +which bundle +bundle install --jobs=3 --retry=3 --path=vendor/bundle
\ No newline at end of file |