Commit 88e500fa authored by Dominik Rosiek's avatar Dominik Rosiek
Browse files

feat(vagrant): update vagrant environment with chef example



ToDo: fix make test
Signed-off-by: default avatarDominik Rosiek <drosiek@sumologic.com>
parent 6411ec80
......@@ -20,3 +20,6 @@ bin/*
.kitchen.local.yml
metadata.json
nodes
cinc_guid
......@@ -23,5 +23,5 @@ Vagrant.configure('2') do |config|
config.vm.provision 'shell', path: 'vagrant/provision.sh'
config.vm.synced_folder ".", "/sumologic"
config.vm.synced_folder ".", "/sumologic/sumologic-collector"
end
.PHONY: run
run:
sudo chef-solo -c config.rb -o recipe[sumologic]
......@@ -30,4 +30,18 @@ After successfull installation you can ssh to the virtual machine with:
vagrant ssh
```
NOTICE: The directory with sumologic-collector-chef-cookbook repository on the host is synced with `/sumologic/` directory on the virtual machine.
To run test:
```bash
cd /sumologic/sumologic-collector/vagrant
make test
```
To run example cookbook:
```bash
cd /sumologic/sumologic-collector/vagrant
make run
```
NOTICE: The directory with sumologic-collector-chef-cookbook repository on the host is synced with `/sumologic/sumologic-collector` directory on the virtual machine.
file_cache_path "/home/vagrant/cache"
cookbook_path ["/sumologic/", "/sumologic/sumologic-collector/vagrant/cookbooks"]
# frozen_string_literal: true
name 'sumologic'
maintainer 'Sumo Logic'
maintainer_email 'opensource@sumologic.com'
license 'Apache-2.0'
version '0.0.0'
chef_version '>= 11' if respond_to?(:chef_version)
depends 'sumologic-collector', '>= 1.6.0'
%w[
debian
ubuntu
centos
redhat
scientific
fedora
amazon
oracle
windows
suse
].each do |os|
supports os
end
sumologic_collector '/opt/SumoCollector' do
:remove
end
sumologic_collector '/opt/SumoCollector' do
action :install
end
......@@ -3,16 +3,11 @@
set -x
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get --yes upgrade
apt-get --yes install apt-transport-https
echo "export EDITOR=vim" >> /home/vagrant/.bashrc
# Install make
apt-get install -y make
# install requirements for ruby
snap install ruby --channel=2.6/stable --classic
su vagrant -c 'gem install bundler:2.1.4'
apt install -y gcc g++
apt update && apt install -y \
ruby \
ruby-dev \
libffi-dev \
build-essential \
chef \
chef-bin
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment