diff --git a/build/vanagon/components/app.rb b/build/vanagon/components/app.rb index 9aee0a6..1ecf11c 100644 --- a/build/vanagon/components/app.rb +++ b/build/vanagon/components/app.rb @@ -5,12 +5,13 @@ if platform.is_deb? pkg.requires 'sqlite3' + pkg.requires 'redis-server' elsif platform.is_el? pkg.requires 'sqlite' + pkg.requires 'redis' else raise("Plaform #{platform.name} is not yet supported") end - pkg.requires 'redis' pkg.build_requires 'ruby-2.6' pkg.build_requires 'sqlite3' diff --git a/resources/generate_token b/resources/generate_token new file mode 100755 index 0000000..1a3aedf --- /dev/null +++ b/resources/generate_token @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +echo "This command will generate an API token for use with Puppet Webhook and will replace any existing token you currently have" + +read -p "are you sure? (y/N)" -n 1 -r + +if [[ $REPLY =~ ^[Yy]$ ]] +then + export SINATRA_EN=production + export RUBYLIB=/opt/voxpupuli/webhook/lib/ruby:/opt/voxpupuli/webhook:/opt/voxpupuli/webhook/app/models + export GEM_HOME=/opt/voxpupuli/webhook/lib/ruby/gems/2.6.0 + export GEM_PATH=$GEM_HOME + export LD_PATH=/opt/voxpupuli/webhook/lib + export PATH=/opt/voxpupuli/webhook/bin:$PATH + cd /opt/voxpupuli/webhook && bin/bundle exec rake db:generate_token --trace + echo "Be sure to save this somewhere as you won't be able to retrieve it again without generating a new token!" +fi