Skip to content

Monster Mojo #862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Nov 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d79b8b7
Initial commit
ssoriche Nov 9, 2018
f9e2f77
add the ability to run the api from the mojo app
jberger Nov 9, 2018
adf07ca
Move MetaCPAN::Queue to MetaCPAN::API
jberger Nov 9, 2018
88fced0
load es and model_search in the main application
jberger Nov 9, 2018
dd5afd5
Add Mojolicious::Plugin::Web::Auth to carton
oalders Nov 8, 2018
8f569a8
Mount an admin app at /admin
oalders Nov 9, 2018
e007dc9
allow mojo to serve the static assets from root/
jberger Nov 9, 2018
d2957cd
Add and update Mojo deps in cpanfile.snapshot
oalders Nov 9, 2018
b0d65b9
start using the mojo application for routes in the openapi spec
jberger Nov 9, 2018
2f6f0eb
Added Model::User + filled search_identities
mickeyn Nov 10, 2018
b805cab
Upgrade Mojo from 8.05 to 8.06
oalders Nov 10, 2018
064a001
Move github credentials and Mojo secret to config file
oalders Nov 10, 2018
ed13dd1
The ES port is no longer in the config file
oalders Nov 10, 2018
5859d59
ES nodes definition for tests, leave empty for default in production …
mickeyn Nov 10, 2018
7f5125d
Change openapi spec to handle new search_web
ssoriche Nov 10, 2018
3ec7909
Separate requests from main spec file
ssoriche Nov 10, 2018
a627311
Add more details to overall spec
ssoriche Nov 10, 2018
ca53a54
attach search/first to the mojo router
jberger Nov 10, 2018
e6939f8
add tests for mojo-based search endpoints
jberger Nov 10, 2018
2954a2e
add symlink from bin/api.pl back to former bin/queue.pl
jberger Nov 10, 2018
3fb8f18
Try to capture Mojo logs via AWS
oalders Nov 10, 2018
61f50f2
Run prove in verbose mode
oalders Nov 10, 2018
2bc8c81
move the model loading to a plugin
jberger Nov 10, 2018
80c1370
Add the stub of a download model
jberger Nov 10, 2018
2a055b8
Add test skips when running on Travis
ssoriche Nov 11, 2018
f609250
Remove verbose and Mojo logging
ssoriche Nov 11, 2018
d90eecb
move new User model to the new model location
jberger Nov 11, 2018
efc531a
Add ReDoc options
ssoriche Nov 11, 2018
3cffcb9
Add comments for Release tag
ssoriche Nov 11, 2018
f9425d2
MetaCPAN::API::Model - moved the es attribute to a role
mickeyn Nov 11, 2018
34fde32
Update documentation for api.pl
ssoriche Nov 11, 2018
bf0cd75
move new tests into t/api
jberger Nov 11, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ install:
- AUTHOR_TESTING=0 cpm install -L $PERL_CARTON_PATH --resolver $CPAN_RESOLVER --workers $(test-jobs) || (tail -n 500 -f ~/.perl-cpm/build.log; false)

before_script:
- "perl -i -pe 's/(servers :)9900/localhost:9200/' metacpan_server_testing.conf"
- bin/wait-for-open http://localhost:9200/
- coverage-setup

Expand Down
40 changes: 40 additions & 0 deletions bin/api.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env perl

use strict;
use warnings;

=head2 DESCRIPTION

This is the API web server interface.

# On vagrant VM
./bin/run morbo bin/api.pl

To run the api web server, run the following on one of the servers:

# Run the daemon on a local port (tunnel to display on your browser)
./bin/run bin/api.pl daemon

Start Minion worker on vagrant:

cd /home/vagrant/metacpan-api
./bin/run bin/api.pl minion worker

Get status on jobs and workers.

On production:

sh /home/metacpan/bin/metacpan-api-carton-exec bin/api.pl minion job -s

On vagrant:

cd /home/vagrant/metacpan-api
./bin/run bin/api.pl minion job -s

=cut

use lib 'lib';

# Start command line interface for application
require Mojolicious::Commands;
Mojolicious::Commands->start_app('MetaCPAN::API');
31 changes: 0 additions & 31 deletions bin/queue.pl

This file was deleted.

1 change: 1 addition & 0 deletions bin/queue.pl
4 changes: 4 additions & 0 deletions cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ requires 'Module::Metadata', '1.000022';
requires 'Module::Pluggable';
requires 'Module::Runtime';
requires 'Mojo::Pg', '>= 4.08';
requires 'Mojolicious::Plugin::Web::Auth', '0.000004';
requires 'Moose', ' >= 2.1403';
requires 'Moose::Role';
requires 'Moose::Util';
Expand Down Expand Up @@ -176,6 +177,9 @@ requires 'strictures', 1;
requires 'utf8';
requires 'version', '0.9901';
requires 'warnings';
requires 'Mojolicious::Plugin::MountPSGI';
requires 'Mojolicious::Plugin::OpenAPI';
requires 'YAML::XS', '0.67'; # Mojolicious::Plugin::OpenAPI YAML loading

test_requires 'App::Prove';
test_requires 'CPAN::Faker', '0.010';
Expand Down
121 changes: 97 additions & 24 deletions cpanfile.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ DISTRIBUTIONS
MooseX::Emulate::Class::Accessor::Fast 0.00903
MooseX::Getopt 0.48
MooseX::MethodAttributes::Role::AttrContainer::Inheritable 0.24
MooseX::Role::WithOverloading 0.09
Path::Class 0.09
Plack 0.9991
Plack::Middleware::Conditional 0
Expand Down Expand Up @@ -3821,6 +3822,19 @@ DISTRIBUTIONS
JSON::PP 2.27300
Scalar::Util 0
perl 5.006
JSON-Validator-2.15
pathname: J/JH/JHTHORSEN/JSON-Validator-2.15.tar.gz
provides:
JSON::Validator 2.15
JSON::Validator::Error undef
JSON::Validator::Joi undef
JSON::Validator::OpenAPI undef
JSON::Validator::OpenAPI::Dancer2 undef
JSON::Validator::OpenAPI::Mojolicious undef
JSON::Validator::Ref undef
requirements:
ExtUtils::MakeMaker 0
Mojolicious 7.28
JSON-XS-3.04
pathname: M/ML/MLEHMANN/JSON-XS-3.04.tar.gz
provides:
Expand Down Expand Up @@ -4281,17 +4295,6 @@ DISTRIBUTIONS
requirements:
ExtUtils::MakeMaker 0
perl 5.006
Mac-SystemDirectory-0.10
pathname: E/ET/ETHER/Mac-SystemDirectory-0.10.tar.gz
provides:
Mac::SystemDirectory 0.10
requirements:
Exporter 0
ExtUtils::MakeMaker 0
XSLoader 0
perl 5.006
strict 0
warnings 0
MailTools-2.19
pathname: M/MA/MARKOV/MailTools-2.19.tar.gz
provides:
Expand Down Expand Up @@ -4720,8 +4723,8 @@ DISTRIBUTIONS
URI::db 0.15
URI::file 4.21
perl 5.010001
Mojolicious-7.56
pathname: S/SR/SRI/Mojolicious-7.56.tar.gz
Mojolicious-8.06
pathname: S/SR/SRI/Mojolicious-8.06.tar.gz
provides:
Mojo undef
Mojo::Asset undef
Expand All @@ -4741,6 +4744,7 @@ DISTRIBUTIONS
Mojo::DOM::CSS undef
Mojo::DOM::HTML undef
Mojo::Date undef
Mojo::DynamicMethods undef
Mojo::EventEmitter undef
Mojo::Exception undef
Mojo::File undef
Expand Down Expand Up @@ -4790,30 +4794,28 @@ DISTRIBUTIONS
Mojo::UserAgent::Transactor undef
Mojo::Util undef
Mojo::WebSocket undef
Mojolicious 7.56
Mojolicious 8.06
Mojolicious::Command undef
Mojolicious::Command::Author::cpanify undef
Mojolicious::Command::Author::generate undef
Mojolicious::Command::Author::generate::app undef
Mojolicious::Command::Author::generate::lite_app undef
Mojolicious::Command::Author::generate::makefile undef
Mojolicious::Command::Author::generate::plugin undef
Mojolicious::Command::Author::inflate undef
Mojolicious::Command::cgi undef
Mojolicious::Command::cpanify undef
Mojolicious::Command::daemon undef
Mojolicious::Command::eval undef
Mojolicious::Command::generate undef
Mojolicious::Command::generate::app undef
Mojolicious::Command::generate::lite_app undef
Mojolicious::Command::generate::makefile undef
Mojolicious::Command::generate::plugin undef
Mojolicious::Command::get undef
Mojolicious::Command::inflate undef
Mojolicious::Command::prefork undef
Mojolicious::Command::psgi undef
Mojolicious::Command::routes undef
Mojolicious::Command::test undef
Mojolicious::Command::version undef
Mojolicious::Commands undef
Mojolicious::Controller undef
Mojolicious::Lite undef
Mojolicious::Plugin undef
Mojolicious::Plugin::Config undef
Mojolicious::Plugin::Config::Sandbox undef
Mojolicious::Plugin::DefaultHelpers undef
Mojolicious::Plugin::EPLRenderer undef
Mojolicious::Plugin::EPRenderer undef
Expand All @@ -4839,9 +4841,47 @@ DISTRIBUTIONS
ExtUtils::MakeMaker 0
IO::Socket::IP 0.37
JSON::PP 2.27103
Pod::Simple 3.09
List::Util 1.41
Time::Local 1.2
perl 5.010001
Mojolicious-Plugin-MountPSGI-0.13
pathname: M/MR/MRAMBERG/Mojolicious-Plugin-MountPSGI-0.13.tar.gz
provides:
Mojolicious::Plugin::MountPSGI 0.13
Mojolicious::Plugin::MountPSGI::Proxy undef
requirements:
ExtUtils::MakeMaker 0
Mojolicious 7.70
Plack 0
Mojolicious-Plugin-OpenAPI-2.01
pathname: J/JH/JHTHORSEN/Mojolicious-Plugin-OpenAPI-2.01.tar.gz
provides:
Mojolicious::Plugin::OpenAPI 2.01
Mojolicious::Plugin::OpenAPI::Cors undef
Mojolicious::Plugin::OpenAPI::Security undef
requirements:
ExtUtils::MakeMaker 0
JSON::Validator 2.14
Mojolicious-Plugin-Web-Auth-0.15
pathname: H/HA/HAYAJO/Mojolicious-Plugin-Web-Auth-0.15.tar.gz
provides:
Mojolicious::Plugin::Web::Auth 0.15
Mojolicious::Plugin::Web::Auth::Base undef
Mojolicious::Plugin::Web::Auth::OAuth undef
Mojolicious::Plugin::Web::Auth::OAuth2 undef
Mojolicious::Plugin::Web::Auth::Site::Dropbox undef
Mojolicious::Plugin::Web::Auth::Site::Facebook undef
Mojolicious::Plugin::Web::Auth::Site::Github undef
Mojolicious::Plugin::Web::Auth::Site::Google undef
Mojolicious::Plugin::Web::Auth::Site::Instagram undef
Mojolicious::Plugin::Web::Auth::Site::Twitter undef
Mojolicious::Plugin::Web::Auth::Site::Yandex undef
requirements:
IO::Socket::SSL 1.77
Module::Build::Tiny 0.035
Mojolicious 3.02
Net::OAuth 0.28
perl 5.008005
Moo-2.003003
pathname: H/HA/HAARG/Moo-2.003003.tar.gz
provides:
Expand Down Expand Up @@ -5512,6 +5552,30 @@ DISTRIBUTIONS
perl 5.008001
strict 0
warnings 0
MooseX-Role-WithOverloading-0.17
pathname: E/ET/ETHER/MooseX-Role-WithOverloading-0.17.tar.gz
provides:
MooseX::Role::WithOverloading 0.17
MooseX::Role::WithOverloading::Meta::Role 0.17
MooseX::Role::WithOverloading::Meta::Role::Application 0.17
MooseX::Role::WithOverloading::Meta::Role::Application::Composite 0.17
MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToClass 0.17
MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToInstance 0.17
MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToRole 0.17
MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs 0.17
MooseX::Role::WithOverloading::Meta::Role::Application::ToClass 0.17
MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance 0.17
MooseX::Role::WithOverloading::Meta::Role::Application::ToRole 0.17
MooseX::Role::WithOverloading::Meta::Role::Composite 0.17
requirements:
ExtUtils::MakeMaker 0
Moose 0.94
Moose::Exporter 0
Moose::Role 1.15
aliased 0
namespace::autoclean 0.16
namespace::clean 0.19
perl 5.006
MooseX-StrictConstructor-0.21
pathname: D/DR/DROLSKY/MooseX-StrictConstructor-0.21.tar.gz
provides:
Expand Down Expand Up @@ -9186,6 +9250,15 @@ DISTRIBUTIONS
requirements:
ExtUtils::MakeMaker 0
perl 5.008001
YAML-LibYAML-0.75
pathname: T/TI/TINITA/YAML-LibYAML-0.75.tar.gz
provides:
YAML::LibYAML 0.75
YAML::XS 0.75
YAML::XS::LibYAML undef
requirements:
ExtUtils::MakeMaker 0
perl 5.008001
YAML-Syck-1.30
pathname: T/TO/TODDR/YAML-Syck-1.30.tar.gz
provides:
Expand Down
Loading