From 592caa1574e35df9dec9304660e4785fdd9a2a2f Mon Sep 17 00:00:00 2001 From: Ralf Teusner Date: Thu, 9 Aug 2018 16:17:28 +0200 Subject: [PATCH 1/3] enable mnemosyne --- Gemfile | 1 + Gemfile.lock | 7 +++++++ config/mnemosyne.yml.example | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 config/mnemosyne.yml.example diff --git a/Gemfile b/Gemfile index 29c2ab7d..11c91e55 100644 --- a/Gemfile +++ b/Gemfile @@ -42,6 +42,7 @@ gem 'nokogiri' gem 'd3-rails', '~>4.0' gem 'rest-client' gem 'rubyzip' +gem 'mnemosyne-ruby', '~> 1.0' gem 'whenever', require: false group :development, :staging do diff --git a/Gemfile.lock b/Gemfile.lock index 262c7687..0c196110 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,6 +41,7 @@ GEM public_suffix (>= 2.0.2, < 4.0) airbrussh (1.3.0) sshkit (>= 1.6.1, != 1.7.0) + amq-protocol (2.3.0) arel (6.0.4) ast (2.4.0) autotest-rails (4.2.1) @@ -57,6 +58,8 @@ GEM bootstrap_pagedown (1.1.0) rails (>= 3.2) builder (3.2.3) + bunny (2.11.0) + amq-protocol (~> 2.3.0) byebug (10.0.0) capistrano (3.10.1) airbrussh (>= 1.0.0) @@ -173,6 +176,9 @@ GEM mini_mime (1.0.0) mini_portile2 (2.3.0) minitest (5.11.3) + mnemosyne-ruby (1.5.1) + activesupport (>= 4) + bunny multi_json (1.13.1) multi_xml (0.6.0) multipart-post (2.0.0) @@ -410,6 +416,7 @@ DEPENDENCIES jquery-rails jquery-turbolinks kramdown + mnemosyne-ruby (~> 1.0) newrelic_rpm nokogiri nyan-cat-formatter diff --git a/config/mnemosyne.yml.example b/config/mnemosyne.yml.example new file mode 100644 index 00000000..a747fe73 --- /dev/null +++ b/config/mnemosyne.yml.example @@ -0,0 +1,26 @@ +# Mnemosyne AMQP sink +common: &common + # AMQP server endpoint + server: <%= ENV['XIKOLO_RABBITMQ_URL'] || 'amqp://localhost' %> + enabled: false + + # Platform identifier to group applications + platform: codeocean + + # AMQP exchange name, must be a topic exchange + # exchange: mnemosyne + + # Application name, defaults to rails application name + application: app + + # Hostname reported with traces, default to machine hostname + # hostname: + +development: + <<: *common + +test: + enabled: false + +production: + <<: *common \ No newline at end of file From 8d8fd13733547e57396c96161fa7164617a059de Mon Sep 17 00:00:00 2001 From: Ralf Teusner Date: Thu, 9 Aug 2018 16:31:31 +0200 Subject: [PATCH 2/3] support travis --- .travis.yml | 1 + config/mnemosyne.yml.example | 5 ++++- config/mnemosyne.yml.travis | 29 +++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 config/mnemosyne.yml.travis diff --git a/.travis.yml b/.travis.yml index e526021a..c17424e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,7 @@ before_script: - cp config/database.yml.travis config/database.yml - cp config/secrets.yml.travis config/secrets.yml - cp config/docker.yml.erb.travis config/docker.yml.erb + - cp config/mnemosyne.yml.travis config/mnemosyne.yml - psql --command='CREATE DATABASE travis_ci_test;' --username=postgres - bundle exec rake db:schema:load RAILS_ENV=test diff --git a/config/mnemosyne.yml.example b/config/mnemosyne.yml.example index a747fe73..c9aceeed 100644 --- a/config/mnemosyne.yml.example +++ b/config/mnemosyne.yml.example @@ -1,7 +1,7 @@ # Mnemosyne AMQP sink common: &common # AMQP server endpoint - server: <%= ENV['XIKOLO_RABBITMQ_URL'] || 'amqp://localhost' %> + server: amqp://localhost enabled: false # Platform identifier to group applications @@ -22,5 +22,8 @@ development: test: enabled: false +staging: + <<: *common + production: <<: *common \ No newline at end of file diff --git a/config/mnemosyne.yml.travis b/config/mnemosyne.yml.travis new file mode 100644 index 00000000..c9aceeed --- /dev/null +++ b/config/mnemosyne.yml.travis @@ -0,0 +1,29 @@ +# Mnemosyne AMQP sink +common: &common + # AMQP server endpoint + server: amqp://localhost + enabled: false + + # Platform identifier to group applications + platform: codeocean + + # AMQP exchange name, must be a topic exchange + # exchange: mnemosyne + + # Application name, defaults to rails application name + application: app + + # Hostname reported with traces, default to machine hostname + # hostname: + +development: + <<: *common + +test: + enabled: false + +staging: + <<: *common + +production: + <<: *common \ No newline at end of file From 6e006fa13bef542db1b54f5b7ef6e4481d37bfc0 Mon Sep 17 00:00:00 2001 From: Ralf Teusner Date: Thu, 9 Aug 2018 16:39:03 +0200 Subject: [PATCH 3/3] added mnemosyne yml files in vagrant provision script and .gitignore (also added missing docker.yml in vagrant script) --- .gitignore | 1 + provision.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c1030982..2b3bb733 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /config/action_mailer.yml /config/code_ocean.yml /config/database.yml +/config/mnemosyne.yml /config/secrets.yml /config/sendmail.yml /config/smtp.yml diff --git a/provision.sh b/provision.sh index a6128d1d..43d72c90 100644 --- a/provision.sh +++ b/provision.sh @@ -109,7 +109,7 @@ sudo apt-get -qq -y install nginx-extras passenger cd /vagrant # config -for f in action_mailer.yml database.yml secrets.yml sendmail.yml smtp.yml code_ocean.yml +for f in action_mailer.yml database.yml secrets.yml sendmail.yml smtp.yml code_ocean.yml docker.yml.erb mnemosyne.yml do if [ ! -f config/$f ] then