openshift-origin-console 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYRIGHT +1 -0
- data/Gemfile +21 -0
- data/LICENSE +203 -0
- data/README.md +123 -0
- data/Rakefile +44 -0
- data/app/assets/images/cartridge-edge.gif +0 -0
- data/app/assets/images/console/arrow-down.png +0 -0
- data/app/assets/images/console/console-sprite.png +0 -0
- data/app/assets/images/favicon-32.png +0 -0
- data/app/assets/images/loader-dark.gif +0 -0
- data/app/assets/images/loader.gif +0 -0
- data/app/assets/images/sprite-vert.png +0 -0
- data/app/assets/javascripts/console.js +10 -0
- data/app/assets/javascripts/console/form.js.coffee +51 -0
- data/app/assets/stylesheets/_alerts.scss +84 -0
- data/app/assets/stylesheets/_breadcrumbs.scss +31 -0
- data/app/assets/stylesheets/_buttons.scss +229 -0
- data/app/assets/stylesheets/_code.scss +86 -0
- data/app/assets/stylesheets/_custom.scss +207 -0
- data/app/assets/stylesheets/_footer.scss +54 -0
- data/app/assets/stylesheets/_forms.scss +710 -0
- data/app/assets/stylesheets/_grid.scss +28 -0
- data/app/assets/stylesheets/_input-prepend-append.scss +138 -0
- data/app/assets/stylesheets/_labels.scss +40 -0
- data/app/assets/stylesheets/_mixins.scss +76 -0
- data/app/assets/stylesheets/_override-variables.scss +1 -0
- data/app/assets/stylesheets/_responsive.scss +438 -0
- data/app/assets/stylesheets/_ribbon.scss +57 -0
- data/app/assets/stylesheets/_type.scss +306 -0
- data/app/assets/stylesheets/_utilities.scss +10 -0
- data/app/assets/stylesheets/_variables.scss +131 -0
- data/app/assets/stylesheets/common.css.scss +82 -0
- data/app/assets/stylesheets/console/_application.scss +194 -0
- data/app/assets/stylesheets/console/_base.scss +26 -0
- data/app/assets/stylesheets/console/_breadcrumbs.scss +32 -0
- data/app/assets/stylesheets/console/_buttons.scss +214 -0
- data/app/assets/stylesheets/console/_core.scss +1002 -0
- data/app/assets/stylesheets/console/_dropdowns.scss +63 -0
- data/app/assets/stylesheets/console/_help.scss +54 -0
- data/app/assets/stylesheets/console/_mixins.scss +11 -0
- data/app/assets/stylesheets/console/_navbar.scss +415 -0
- data/app/assets/stylesheets/console/_ribbon.scss +82 -0
- data/app/assets/stylesheets/console/_tile.scss +122 -0
- data/app/assets/stylesheets/origin.css.scss +37 -0
- data/app/controllers/account/dashboard.rb +13 -0
- data/app/controllers/account_controller.rb +3 -0
- data/app/controllers/application_types_controller.rb +80 -0
- data/app/controllers/applications_controller.rb +183 -0
- data/app/controllers/building_controller.rb +81 -0
- data/app/controllers/capability_aware.rb +18 -0
- data/app/controllers/cartridge_types_controller.rb +53 -0
- data/app/controllers/cartridges_controller.rb +43 -0
- data/app/controllers/console/auth/basic.rb +65 -0
- data/app/controllers/console/auth/none.rb +5 -0
- data/app/controllers/console/auth/remote_user.rb +69 -0
- data/app/controllers/console/rescue.rb +48 -0
- data/app/controllers/console_controller.rb +19 -0
- data/app/controllers/console_index_controller.rb +14 -0
- data/app/controllers/domain_aware.rb +26 -0
- data/app/controllers/domain_session_sweeper.rb +29 -0
- data/app/controllers/domains_controller.rb +30 -0
- data/app/controllers/keys_controller.rb +43 -0
- data/app/controllers/scaling_controller.rb +46 -0
- data/app/controllers/sshkey_aware.rb +23 -0
- data/app/controllers/sshkey_session_sweeper.rb +29 -0
- data/app/controllers/user_session_sweeper.rb +29 -0
- data/app/helpers/console/community_helper.rb +78 -0
- data/app/helpers/console/console_helper.rb +26 -0
- data/app/helpers/console/help_helper.rb +270 -0
- data/app/helpers/console/html5_boilerplate_helper.rb +63 -0
- data/app/helpers/console/layout_helper.rb +277 -0
- data/app/helpers/console/model_helper.rb +106 -0
- data/app/helpers/console/secured_helper.rb +5 -0
- data/app/models/alias.rb +10 -0
- data/app/models/application.rb +148 -0
- data/app/models/application_associations.rb +36 -0
- data/app/models/application_template.rb +90 -0
- data/app/models/application_type.rb +258 -0
- data/app/models/async_aware.rb +60 -0
- data/app/models/capabilities.rb +62 -0
- data/app/models/cartridge.rb +122 -0
- data/app/models/cartridge_type.rb +140 -0
- data/app/models/domain.rb +44 -0
- data/app/models/domain_associations.rb +33 -0
- data/app/models/embedded.rb +11 -0
- data/app/models/gear.rb +13 -0
- data/app/models/gear_group.rb +104 -0
- data/app/models/key.rb +87 -0
- data/app/models/quickstart.rb +135 -0
- data/app/models/rest_api.rb +130 -0
- data/app/models/rest_api/base.rb +781 -0
- data/app/models/rest_api/cacheable.rb +91 -0
- data/app/models/rest_api/environment.rb +13 -0
- data/app/models/rest_api/info.rb +34 -0
- data/app/models/rest_api/log_subscriber.rb +29 -0
- data/app/models/rest_api/railties/controller_runtime.rb +37 -0
- data/app/models/user.rb +27 -0
- data/app/models/user_associations.rb +6 -0
- data/app/views/account/_domain.html.haml +14 -0
- data/app/views/account/_keys.html.haml +20 -0
- data/app/views/account/_user.html.haml +5 -0
- data/app/views/account/show.html.haml +15 -0
- data/app/views/application_templates/_application_template.html.haml +5 -0
- data/app/views/application_types/_application_type.html.haml +19 -0
- data/app/views/application_types/_custom.html.haml +19 -0
- data/app/views/application_types/_persisted.html.haml +26 -0
- data/app/views/application_types/_tile.html.haml +9 -0
- data/app/views/application_types/index.html.haml +87 -0
- data/app/views/application_types/search.html.haml +67 -0
- data/app/views/application_types/show.html.haml +219 -0
- data/app/views/applications/_application.html.haml +34 -0
- data/app/views/applications/_applications_filter.html.haml +8 -0
- data/app/views/applications/_footer.html.haml +0 -0
- data/app/views/applications/_name.html.haml +28 -0
- data/app/views/applications/delete.html.haml +19 -0
- data/app/views/applications/get_started.html.haml +145 -0
- data/app/views/applications/index.html.haml +55 -0
- data/app/views/applications/show.html.haml +193 -0
- data/app/views/building/delete.html.haml +22 -0
- data/app/views/building/new.html.haml +57 -0
- data/app/views/building/show.html.haml +12 -0
- data/app/views/cartridge_types/_cartridge_type.html.haml +61 -0
- data/app/views/cartridge_types/index.html.haml +37 -0
- data/app/views/cartridge_types/show.html.haml +21 -0
- data/app/views/cartridges/next_steps.html.haml +58 -0
- data/app/views/cartridges/show.html.haml +1 -0
- data/app/views/console/error.html.haml +58 -0
- data/app/views/console/help.html.haml +90 -0
- data/app/views/console/not_found.html.haml +69 -0
- data/app/views/console/unauthorized.html.haml +7 -0
- data/app/views/domains/_domain.html.haml +14 -0
- data/app/views/domains/_form.html.haml +13 -0
- data/app/views/domains/edit.html.haml +5 -0
- data/app/views/domains/new.html.haml +6 -0
- data/app/views/keys/_form.html.haml +14 -0
- data/app/views/keys/_simple_form.html.haml +14 -0
- data/app/views/keys/new.html.haml +2 -0
- data/app/views/layouts/_footer.html.haml +38 -0
- data/app/views/layouts/_head.html.haml +35 -0
- data/app/views/layouts/console.html.haml +60 -0
- data/app/views/layouts/console/_header.html.haml +44 -0
- data/app/views/layouts/console/_identity.html.haml +7 -0
- data/app/views/layouts/console/_javascripts.html.haml +5 -0
- data/app/views/layouts/console/_stylesheets.html.haml +6 -0
- data/app/views/scaling/delete.html.haml +17 -0
- data/app/views/scaling/new.html.haml +24 -0
- data/app/views/scaling/show.html.haml +81 -0
- data/app/views/shared/_tracking.html.haml +0 -0
- data/conf/console.conf.example +108 -0
- data/conf/openshift_console.conf +10 -0
- data/config/cartridge_types.yml +54 -0
- data/config/initializers/barista_config.rb +86 -0
- data/config/initializers/cartridge_types.rb +5 -0
- data/config/initializers/console_security.rb +1 -0
- data/config/initializers/date_helper.rb +5 -0
- data/config/initializers/extended_logger.rb +51 -0
- data/config/initializers/formtastic.rb +100 -0
- data/config/initializers/inflections.rb +38 -0
- data/config/initializers/rdiscount.rb +8 -0
- data/config/initializers/rest_api.rb +22 -0
- data/config/initializers/sass.rb +30 -0
- data/config/initializers/session_trace.rb +32 -0
- data/config/initializers/x_frame_options.rb +53 -0
- data/config/locales/en.yml +12 -0
- data/lib/active_resource/associations.rb +107 -0
- data/lib/active_resource/associations/builder/association.rb +35 -0
- data/lib/active_resource/associations/builder/belongs_to.rb +5 -0
- data/lib/active_resource/associations/builder/has_many.rb +5 -0
- data/lib/active_resource/associations/builder/has_one.rb +5 -0
- data/lib/active_resource/persistent_connection.rb +341 -0
- data/lib/active_resource/persistent_http_mock.rb +68 -0
- data/lib/active_resource/reflection.rb +78 -0
- data/lib/console.rb +8 -0
- data/lib/console/config_file.rb +13 -0
- data/lib/console/configuration.rb +163 -0
- data/lib/console/engine.rb +28 -0
- data/lib/console/formtastic/bootstrap_form_builder.rb +369 -0
- data/lib/console/rails/app_redirector.rb +40 -0
- data/lib/console/rails/filter_hash.rb +15 -0
- data/lib/console/rails/routes.rb +51 -0
- data/lib/console/version.rb +5 -0
- data/lib/tasks/assets.rake +79 -0
- data/lib/tasks/stats.rake +18 -0
- data/lib/tasks/test_suites.rake +73 -0
- data/test/coverage_helper.rb +27 -0
- data/test/fixtures/cartridges.json +1 -0
- data/test/fixtures/quickstarts.csv +3 -0
- data/test/functional/account_controller_test.rb +14 -0
- data/test/functional/application_types_controller_test.rb +251 -0
- data/test/functional/applications_controller_sanity_test.rb +26 -0
- data/test/functional/applications_controller_test.rb +365 -0
- data/test/functional/building_controller_test.rb +203 -0
- data/test/functional/cartridge_types_controller_isolation_test.rb +68 -0
- data/test/functional/cartridge_types_controller_test.rb +48 -0
- data/test/functional/cartridges_controller_test.rb +83 -0
- data/test/functional/console_auth_basic_controller_test.rb +82 -0
- data/test/functional/console_auth_remote_user_controller_test.rb +90 -0
- data/test/functional/console_index_controller_test.rb +22 -0
- data/test/functional/domains_controller_test.rb +194 -0
- data/test/functional/keys_controller_test.rb +163 -0
- data/test/functional/quickstarts.json +18 -0
- data/test/functional/scaling_controller_test.rb +153 -0
- data/test/integration/assets_test.rb +34 -0
- data/test/integration/help_link_test.rb +43 -0
- data/test/integration/quickstarts_test.rb +24 -0
- data/test/integration/rescue_from_test.rb +25 -0
- data/test/integration/rest_api/application_test.rb +115 -0
- data/test/integration/rest_api/cartridge_test.rb +44 -0
- data/test/integration/rest_api/cartridge_type_test.rb +143 -0
- data/test/integration/rest_api/domain_test.rb +91 -0
- data/test/integration/rest_api/info_test.rb +9 -0
- data/test/integration/rest_api/key_test.rb +85 -0
- data/test/integration/static_pages_test.rb +44 -0
- data/test/rails_app/Rakefile +7 -0
- data/test/rails_app/app/controllers/application_controller.rb +5 -0
- data/test/rails_app/config.ru +4 -0
- data/test/rails_app/config/application.rb +48 -0
- data/test/rails_app/config/boot.rb +10 -0
- data/test/rails_app/config/database.yml +25 -0
- data/test/rails_app/config/environment.rb +5 -0
- data/test/rails_app/config/environments/development.rb +38 -0
- data/test/rails_app/config/environments/production.rb +70 -0
- data/test/rails_app/config/environments/test.rb +43 -0
- data/test/rails_app/config/initializers/auth.rb +0 -0
- data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_app/config/initializers/inflections.rb +10 -0
- data/test/rails_app/config/initializers/mime_types.rb +5 -0
- data/test/rails_app/config/initializers/secret_token.rb +7 -0
- data/test/rails_app/config/initializers/session_store.rb +8 -0
- data/test/rails_app/config/locales/en.yml +5 -0
- data/test/rails_app/config/routes.rb +4 -0
- data/test/rails_app/script/rails +6 -0
- data/test/support/auth.rb +111 -0
- data/test/support/base.rb +142 -0
- data/test/support/errors.rb +28 -0
- data/test/support/rest_api.rb +189 -0
- data/test/test_helper.rb +14 -0
- data/test/unit/active_model_compliance_test.rb +23 -0
- data/test/unit/async_aware_test.rb +55 -0
- data/test/unit/configuration_test.rb +158 -0
- data/test/unit/filter_hash_test.rb +64 -0
- data/test/unit/helpers/model_helper_test.rb +61 -0
- data/test/unit/overrides_test.rb +9 -0
- data/test/unit/rest_api_test.rb +1590 -0
- data/vendor/assets/javascripts/MIT-LICENSE.txt +20 -0
- data/vendor/assets/javascripts/bootstrap-collapse.js +157 -0
- data/vendor/assets/javascripts/bootstrap-dropdown.js +100 -0
- data/vendor/assets/javascripts/bootstrap-tab.js +135 -0
- data/vendor/assets/javascripts/bootstrap-transition.js +61 -0
- data/vendor/assets/javascripts/jquery.spin.js +47 -0
- data/vendor/assets/javascripts/jquery.ui.widget.js +16 -0
- data/vendor/assets/javascripts/jquery_cookie.js +41 -0
- data/vendor/assets/javascripts/jquery_validate_min.js +51 -0
- data/vendor/assets/javascripts/modernizr.min.js +2 -0
- data/vendor/assets/javascripts/plugins.js +16 -0
- data/vendor/assets/stylesheets/bootstrap/_accordion.scss +28 -0
- data/vendor/assets/stylesheets/bootstrap/_alerts.scss +70 -0
- data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +22 -0
- data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +147 -0
- data/vendor/assets/stylesheets/bootstrap/_buttons.scss +183 -0
- data/vendor/assets/stylesheets/bootstrap/_carousel.scss +121 -0
- data/vendor/assets/stylesheets/bootstrap/_close.scss +18 -0
- data/vendor/assets/stylesheets/bootstrap/_code.scss +57 -0
- data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +18 -0
- data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +130 -0
- data/vendor/assets/stylesheets/bootstrap/_forms.scss +522 -0
- data/vendor/assets/stylesheets/bootstrap/_grid.scss +8 -0
- data/vendor/assets/stylesheets/bootstrap/_hero-unit.scss +20 -0
- data/vendor/assets/stylesheets/bootstrap/_labels.scss +32 -0
- data/vendor/assets/stylesheets/bootstrap/_layouts.scss +17 -0
- data/vendor/assets/stylesheets/bootstrap/_mixins.scss +602 -0
- data/vendor/assets/stylesheets/bootstrap/_modals.scss +84 -0
- data/vendor/assets/stylesheets/bootstrap/_navbar.scss +299 -0
- data/vendor/assets/stylesheets/bootstrap/_navs.scss +353 -0
- data/vendor/assets/stylesheets/bootstrap/_pager.scss +30 -0
- data/vendor/assets/stylesheets/bootstrap/_pagination.scss +55 -0
- data/vendor/assets/stylesheets/bootstrap/_popovers.scss +49 -0
- data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +95 -0
- data/vendor/assets/stylesheets/bootstrap/_reset.scss +126 -0
- data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +33 -0
- data/vendor/assets/stylesheets/bootstrap/_sprites.scss +158 -0
- data/vendor/assets/stylesheets/bootstrap/_tables.scss +150 -0
- data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +35 -0
- data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +35 -0
- data/vendor/assets/stylesheets/bootstrap/_type.scss +218 -0
- data/vendor/assets/stylesheets/bootstrap/_utilities.scss +23 -0
- data/vendor/assets/stylesheets/bootstrap/_variables.scss +107 -0
- data/vendor/assets/stylesheets/bootstrap/_wells.scss +17 -0
- data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +66 -0
- data/vendor/assets/stylesheets/bootstrap/responsive.scss +334 -0
- metadata +506 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
- content_for :javascripts do
|
|
2
|
+
-#= javascript_include_tag status_jsonp_url('outage')
|
|
3
|
+
:javascript
|
|
4
|
+
window.loader_image = '#{image_path('loader-dark.gif')}';
|
|
5
|
+
|
|
6
|
+
!!! 5
|
|
7
|
+
-# http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither
|
|
8
|
+
-ie_html :class => 'no-js', :lang => 'en' do
|
|
9
|
+
%head
|
|
10
|
+
= render "layouts/head"
|
|
11
|
+
= render "layouts/console/stylesheets"
|
|
12
|
+
|
|
13
|
+
%body{ :class => "console #{controller.controller_name} #{controller.action_name}" }
|
|
14
|
+
|
|
15
|
+
%header
|
|
16
|
+
= render 'layouts/console/header'
|
|
17
|
+
|
|
18
|
+
.section-console#content{:class => content_for?(:dark_layout) ? '' : 'section-console-light'}
|
|
19
|
+
.container
|
|
20
|
+
.row-console
|
|
21
|
+
- if content_for? :full_layout
|
|
22
|
+
.row.row-flush-right
|
|
23
|
+
.grid-wrapper.banner-ribbon
|
|
24
|
+
.span12.span-flush-right
|
|
25
|
+
- if content_for? :breadcrumbs
|
|
26
|
+
%nav
|
|
27
|
+
= yield :breadcrumbs
|
|
28
|
+
= yield :top
|
|
29
|
+
.grid-wrapper.section-body
|
|
30
|
+
.span12
|
|
31
|
+
= flashes
|
|
32
|
+
= yield
|
|
33
|
+
|
|
34
|
+
- else
|
|
35
|
+
.row.row-flush-right
|
|
36
|
+
.grid-wrapper.banner-ribbon
|
|
37
|
+
.span12.span-flush-right
|
|
38
|
+
- if content_for? :breadcrumbs
|
|
39
|
+
%nav
|
|
40
|
+
= yield :breadcrumbs
|
|
41
|
+
- else
|
|
42
|
+
|
|
43
|
+
= yield :top
|
|
44
|
+
.column-content.grid-wrapper
|
|
45
|
+
.span12
|
|
46
|
+
= flashes
|
|
47
|
+
= yield
|
|
48
|
+
|
|
49
|
+
%footer
|
|
50
|
+
= yield :footer
|
|
51
|
+
|
|
52
|
+
= render 'layouts/footer'
|
|
53
|
+
|
|
54
|
+
= render 'layouts/console/javascripts'
|
|
55
|
+
|
|
56
|
+
= render('shared/tracking',
|
|
57
|
+
:controller => controller.controller_name,
|
|
58
|
+
:action => controller.action_name,
|
|
59
|
+
:event => @event ||= '',
|
|
60
|
+
:evar8 => @evar8 ||= '') if Rails.env.production?
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.navbar
|
|
2
|
+
.navbar-inner
|
|
3
|
+
.container
|
|
4
|
+
|
|
5
|
+
%ul.navbar-text.pull-right#utility-nav
|
|
6
|
+
%li.hidden-phone= link_to "Community", community_url, :class => 'community'
|
|
7
|
+
%li.hidden-phone= link_to "Developer Center", developers_url, :class => 'developer'
|
|
8
|
+
- if Console.config.disable_account
|
|
9
|
+
%li.hidden-phone= link_to "Sign Out", logout_path, :class => "sign_out"
|
|
10
|
+
- elsif logout_path.nil?
|
|
11
|
+
%li.hidden-phone= link_to "My Account", account_path
|
|
12
|
+
- else
|
|
13
|
+
%li.dropdown.username.hidden-phone
|
|
14
|
+
= link_to current_user_id, account_path, :class => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'
|
|
15
|
+
%ul.dropdown-menu.hidden-phone
|
|
16
|
+
%li= link_to "My Account", account_path
|
|
17
|
+
%li= link_to "Sign Out", logout_path, :class => "sign_out"
|
|
18
|
+
-#%li= link_to "Status", status_url, :title => 'Track open issues on the OpenShift status page', :id => 'outage', :class => 'alert', :style => 'display:none;'
|
|
19
|
+
|
|
20
|
+
%a.btn.btn-navbar{'data-target' => '.nav-collapse', 'data-toggle' => 'collapse'}
|
|
21
|
+
%span.icon-bar
|
|
22
|
+
%span.icon-bar
|
|
23
|
+
%span.icon-bar
|
|
24
|
+
|
|
25
|
+
.brand
|
|
26
|
+
= link_to root_path do
|
|
27
|
+
= product_branding
|
|
28
|
+
|
|
29
|
+
%span.navbar-text.headline
|
|
30
|
+
Management Console
|
|
31
|
+
|
|
32
|
+
.nav-collapse.collapse
|
|
33
|
+
= navigation_tabs do
|
|
34
|
+
= navigation_tab :applications, :action => :index, :name => "My Applications"
|
|
35
|
+
= navigation_tab :application_types, :name => "Create Application"
|
|
36
|
+
= navigation_tab :console_index, :action => :help, :name => "Help"
|
|
37
|
+
- unless Console.config.disable_account
|
|
38
|
+
= navigation_tab :account, :action => :show, :name => "My Account"
|
|
39
|
+
%ul.nav.visible-phone
|
|
40
|
+
%li= link_to "Community", community_url, :class => 'community'
|
|
41
|
+
%li= link_to "Developer Center", developers_url, :class => 'developer'
|
|
42
|
+
- unless logout_path.nil?
|
|
43
|
+
%ul.nav.visible-phone
|
|
44
|
+
%li= link_to "Sign Out", logout_path, :class => "sign_out"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
- breadcrumb_for_application @application, 'Disable Scaling'
|
|
2
|
+
- content_for :page_title, 'Disable Scaling'
|
|
3
|
+
|
|
4
|
+
%h1 Disable Scaling
|
|
5
|
+
|
|
6
|
+
%section
|
|
7
|
+
%p
|
|
8
|
+
Your application is currently set to scale the web cartridge.
|
|
9
|
+
At this time applications that scale cannot have scaling disabled.
|
|
10
|
+
You must create a new application and migrate your source code if
|
|
11
|
+
you wish to remove the high availability proxy cartridge that
|
|
12
|
+
provides scaling.
|
|
13
|
+
|
|
14
|
+
%p
|
|
15
|
+
We hope to add this feature in the future - you can provide feedback
|
|
16
|
+
about this and other features in OpenShift via our #{link_to 'feature request page', suggest_features_url}.
|
|
17
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
- breadcrumb_for_application @application, 'Scaling'
|
|
2
|
+
- content_for :page_title, 'Scaling'
|
|
3
|
+
|
|
4
|
+
%h1 Not Scalable
|
|
5
|
+
= flashes
|
|
6
|
+
|
|
7
|
+
%section
|
|
8
|
+
%p
|
|
9
|
+
This application is not currently scalable. For the time being
|
|
10
|
+
applications must be set to scale when they are created. To make a
|
|
11
|
+
new application scalable you will need to pass the command line
|
|
12
|
+
option <code>--scale</code>:
|
|
13
|
+
|
|
14
|
+
%pre.cli
|
|
15
|
+
rhc app create --scaling -a <your application> ...
|
|
16
|
+
|
|
17
|
+
%p
|
|
18
|
+
For more information about scaling your applications see
|
|
19
|
+
#{link_to 'our scaling guide in the Developer Center', scaling_help_url}.
|
|
20
|
+
|
|
21
|
+
%p
|
|
22
|
+
We hope to add the ability to enable scaling on existing applications in the
|
|
23
|
+
future - you can provide feedback about this and other features in
|
|
24
|
+
OpenShift via our #{link_to 'feature request page', suggest_features_url}.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
- breadcrumb_for_application @application, 'Scale your Application'
|
|
2
|
+
- content_for :page_title, 'Scale your Application'
|
|
3
|
+
|
|
4
|
+
%h1 Scale your Application
|
|
5
|
+
|
|
6
|
+
%section#scaling-gear-groups
|
|
7
|
+
- @cartridges.each do |cartridge|
|
|
8
|
+
.gear-group.tile
|
|
9
|
+
%h2
|
|
10
|
+
= cartridge.display_name
|
|
11
|
+
- if cartridge.scales?
|
|
12
|
+
%span.pull-right Using #{pluralize(cartridge.current_scale, 'gears')}
|
|
13
|
+
|
|
14
|
+
- if cartridge.scales?
|
|
15
|
+
= semantic_form_for cartridge,
|
|
16
|
+
:simple => true,
|
|
17
|
+
:method => :put,
|
|
18
|
+
:url => application_scaling_cartridge_path(@application.id, cartridge.name) do |f|
|
|
19
|
+
|
|
20
|
+
= f.semantic_errors :scales_from, :scales_to
|
|
21
|
+
|
|
22
|
+
- if cartridge.tags.include?(:web_framework)
|
|
23
|
+
%p
|
|
24
|
+
OpenShift is configured to scale this cartridge with
|
|
25
|
+
#{link_to 'the web proxy HAProxy', scaling_help_url }. OpenShift
|
|
26
|
+
monitors the incoming web traffic to your application and
|
|
27
|
+
automatically adds or removes copies of your cartridge
|
|
28
|
+
(each running on their own gears) to serve requests as needed.
|
|
29
|
+
|
|
30
|
+
%p Control the number of gears OpenShift will use for your cartridge:
|
|
31
|
+
|
|
32
|
+
= f.inputs :inline => true, :without_errors => true do
|
|
33
|
+
.input-prepend
|
|
34
|
+
%span.add-on Minimum
|
|
35
|
+
= f.input :scales_from, scale_from_options(cartridge, @user.max_gears).merge({:input_html => {:style => 'width: auto', :title => 'Minimum gears'}})
|
|
36
|
+
and
|
|
37
|
+
.input-prepend
|
|
38
|
+
%span.add-on Maximum
|
|
39
|
+
= f.input :scales_to, scale_to_options(cartridge, @user.max_gears).merge({:input_html => {:style => 'width: auto', :title => 'Maximum gears'}})
|
|
40
|
+
|
|
41
|
+
#{cartridge.gear_profile} gears
|
|
42
|
+
|
|
43
|
+
= f.commit_button :label => 'Save', :button_html => {:class => 'btn btn-small'}
|
|
44
|
+
= f.loading
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
- if cartridge.tags.include?(:web_framework)
|
|
48
|
+
|
|
49
|
+
%hr
|
|
50
|
+
|
|
51
|
+
%p
|
|
52
|
+
Each scaled gear is created the same way - the normal
|
|
53
|
+
post, pre, and deploy hooks are executed. Each cartridge will have its
|
|
54
|
+
own copy of runtime data, so be sure to use a database if you need to share
|
|
55
|
+
data across your web cartridges.
|
|
56
|
+
|
|
57
|
+
%p
|
|
58
|
+
For status information about traffic to your application, see the HAProxy status page:
|
|
59
|
+
|
|
60
|
+
%p.application-url.larger
|
|
61
|
+
= link_to @application.scale_status_url, @application.scale_status_url, :target => '_blank'
|
|
62
|
+
|
|
63
|
+
- elsif cartridge.tags.include? :scales
|
|
64
|
+
%p This cartridge assists other cartridges in scaling, but does not itself scale.
|
|
65
|
+
- else
|
|
66
|
+
%p This cartridge does not scale.
|
|
67
|
+
%p
|
|
68
|
+
For more information about scaling your application see
|
|
69
|
+
#{link_to 'our scaling guide in the Developer Center', scaling_help_url}.
|
|
70
|
+
|
|
71
|
+
- content_for :javascripts do
|
|
72
|
+
:javascript
|
|
73
|
+
jQuery('#scaling-gear-groups FORM').each(function() {
|
|
74
|
+
btn = $('INPUT.btn', this)[0];
|
|
75
|
+
$('SELECT', this).change(function() {
|
|
76
|
+
$(btn).addClass('btn-primary');
|
|
77
|
+
});
|
|
78
|
+
$('INPUT', this).change(function() {
|
|
79
|
+
$(btn).addClass('btn-primary');
|
|
80
|
+
});
|
|
81
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
#
|
|
2
|
+
# The base URL for the OpenShift REST API on the broker. If your
|
|
3
|
+
# environment is configured with a virtual host security module that
|
|
4
|
+
# bypasses normal authentication, be sure to set that virtual host
|
|
5
|
+
# here.
|
|
6
|
+
#
|
|
7
|
+
# Required
|
|
8
|
+
#
|
|
9
|
+
BROKER_URL=https://localhost/broker/rest
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
#
|
|
13
|
+
# A proxy URL to use when connecting with the broker.
|
|
14
|
+
#
|
|
15
|
+
# Optional
|
|
16
|
+
#
|
|
17
|
+
# BROKER_PROXY_URL=
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
#
|
|
21
|
+
# SSL settings for the connection between the console and broker.
|
|
22
|
+
# Specified as a Ruby hash of options to be passed to Net::HTTP.
|
|
23
|
+
#
|
|
24
|
+
# Optional, will use the default Ruby environment settings
|
|
25
|
+
#
|
|
26
|
+
# No certificate checking (INSECURE, use only in trusted networks):
|
|
27
|
+
# BROKER_API_SSL_OPTIONS={:verify_mode => OpenSSL::SSL::VERIFY_NONE}
|
|
28
|
+
#
|
|
29
|
+
# Perform cert checking and require SSLv3 (some Mac environments may
|
|
30
|
+
# need this set):
|
|
31
|
+
# BROKER_API_SSL_OPTIONS={:verify_mode => OpenSSL::SSL::VERIFY_PEER, :ssl_version => :SSLv3}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
#
|
|
35
|
+
# The type of security mode that OpenShift should use. There are
|
|
36
|
+
# two provided modules and the ability to specify a custom class.
|
|
37
|
+
#
|
|
38
|
+
# basic
|
|
39
|
+
# When a user accesses the console through a browser, the console
|
|
40
|
+
# will force BASIC authentication, and then pass that info on
|
|
41
|
+
# to the broker.
|
|
42
|
+
#
|
|
43
|
+
# remote_user
|
|
44
|
+
# The console is configured to check for the presence of one or
|
|
45
|
+
# more headers on incoming requests in order to determine whether
|
|
46
|
+
# a user is secure. Headers may be copied along to the remote
|
|
47
|
+
# server.
|
|
48
|
+
#
|
|
49
|
+
# Intended for use with mod_auth and other similar REMOTE_USER
|
|
50
|
+
# concepts in HTTP servers, where an HTTP proxy may handle
|
|
51
|
+
# authentication and then forward the request with information
|
|
52
|
+
# about the authenticated user.
|
|
53
|
+
#
|
|
54
|
+
# <class name>
|
|
55
|
+
# The name of a class to load that will provide a security
|
|
56
|
+
# implementation usable by the console. See
|
|
57
|
+
# Console::Auth::RemoteUser for an example of a secure
|
|
58
|
+
# implementation. The class will be required by Ruby code
|
|
59
|
+
# during startup of the console and any errors will prevent
|
|
60
|
+
# load.
|
|
61
|
+
#
|
|
62
|
+
CONSOLE_SECURITY=basic
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
#
|
|
66
|
+
# The name of the request env variable or header that indicates a
|
|
67
|
+
# user is authenticated. This value will be used as the display
|
|
68
|
+
# name for the user unless remote_user_name_header is set.
|
|
69
|
+
#
|
|
70
|
+
# The value you provide here will be the key used to access the
|
|
71
|
+
# Rack environment. All keys must be uppercase, and headers must
|
|
72
|
+
# be prefixed with "HTTP_". Without that prefix, the value will
|
|
73
|
+
# assumed to be set by Passenger into the environment.
|
|
74
|
+
#
|
|
75
|
+
# When using mod_auth this value is normally set to 'REMOTE_USER'
|
|
76
|
+
#
|
|
77
|
+
# To read the HTTP request header 'X-Remote-User', set this to
|
|
78
|
+
# 'HTTP_X_REMOTE_USER'.
|
|
79
|
+
#
|
|
80
|
+
# Required when CONSOLE_SECURITY=remote_user
|
|
81
|
+
#
|
|
82
|
+
# REMOTE_USER_HEADER=REMOTE_USER
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
#
|
|
86
|
+
# When using remote_user security, the value of the authentication
|
|
87
|
+
# header may not be human readable or intended for display. This
|
|
88
|
+
# optional setting will first check for the presence of
|
|
89
|
+
# REMOTE_USER_HEADER and then if this header is present, use it as
|
|
90
|
+
# the visible user name. If the header is missing, the value of
|
|
91
|
+
# REMOTE_USER_HEADER will be shown instead. This a Rack environment
|
|
92
|
+
# variable and so must follow the same rules as REMOTE_USER_HEADER.
|
|
93
|
+
#
|
|
94
|
+
# Optional
|
|
95
|
+
#
|
|
96
|
+
# REMOTE_USER_NAME_HEADER=HTTP_X_REMOTE_USER_NAME
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
#
|
|
100
|
+
# A list of headers to pass from the incoming request to the API
|
|
101
|
+
# calls made against the broker for preserving authentication state.
|
|
102
|
+
# Separate header names with commas. The console will simply copy
|
|
103
|
+
# these values without inspection.
|
|
104
|
+
#
|
|
105
|
+
# Required when CONSOLE_SECURITY=remote_user, may be empty
|
|
106
|
+
#
|
|
107
|
+
# REMOTE_USER_COPY_HEADERS=X-Remote-User,Cookies
|
|
108
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
- :categories:
|
|
3
|
+
- :blacklist
|
|
4
|
+
- :administration
|
|
5
|
+
:name: 10gen-mms-agent-0.1
|
|
6
|
+
|
|
7
|
+
- :categories:
|
|
8
|
+
- :administration
|
|
9
|
+
:display_name: phpMyAdmin 3.4
|
|
10
|
+
:requires:
|
|
11
|
+
- mysql-5.1
|
|
12
|
+
:name: phpmyadmin-3.4
|
|
13
|
+
|
|
14
|
+
- :name: cron-1.4
|
|
15
|
+
:priority: 2
|
|
16
|
+
|
|
17
|
+
- :categories:
|
|
18
|
+
- :administration
|
|
19
|
+
:requires:
|
|
20
|
+
- mongodb-2.2
|
|
21
|
+
:name: rockmongo-1.1
|
|
22
|
+
|
|
23
|
+
- :categories:
|
|
24
|
+
- :blacklist
|
|
25
|
+
:name: haproxy-1.4
|
|
26
|
+
|
|
27
|
+
- :categories:
|
|
28
|
+
- :premium
|
|
29
|
+
- :featured
|
|
30
|
+
- :new
|
|
31
|
+
:name: jbosseap-6.0
|
|
32
|
+
:priority: -1
|
|
33
|
+
|
|
34
|
+
- :name: zend-5.6
|
|
35
|
+
:priority: -1
|
|
36
|
+
:categories:
|
|
37
|
+
- :new
|
|
38
|
+
- :featured
|
|
39
|
+
|
|
40
|
+
- :description: Ruby is a dynamic, reflective, general-purpose object-oriented programming language. We recommend using Ruby 1.9.3 for new applications.
|
|
41
|
+
:name: ruby-1.8
|
|
42
|
+
:priority: 2
|
|
43
|
+
|
|
44
|
+
- :categories:
|
|
45
|
+
- :custom
|
|
46
|
+
:name: diy-0.1
|
|
47
|
+
:priority: 1
|
|
48
|
+
|
|
49
|
+
- :name: jenkins-1.4
|
|
50
|
+
:priority: 1
|
|
51
|
+
|
|
52
|
+
- :name: jbossews-1.0
|
|
53
|
+
:categories:
|
|
54
|
+
- :new
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
unless true #Console.config.disable_js
|
|
2
|
+
#
|
|
3
|
+
# Configure barista.to generate to tmp/javascripts, and configure Rack
|
|
4
|
+
# to attempt to serve JS out of tmp/javascripts for the /app/javascripts path
|
|
5
|
+
#
|
|
6
|
+
Barista.configure do |c|
|
|
7
|
+
|
|
8
|
+
# Change the root to use app/scripts
|
|
9
|
+
# c.root = Rails.root.join("app", "scripts")
|
|
10
|
+
|
|
11
|
+
# Change the output root, causing Barista to compile into tmp/javascripts
|
|
12
|
+
c.output_root = Rails.root.join("tmp", "javascripts")
|
|
13
|
+
#
|
|
14
|
+
# Disable auto compile, use generated file directly:
|
|
15
|
+
c.auto_compile = Rails.env.development?
|
|
16
|
+
|
|
17
|
+
c.register :console, :root => Console::Engine.root.join("app", "coffeescripts")
|
|
18
|
+
|
|
19
|
+
# Add a new framework:
|
|
20
|
+
|
|
21
|
+
# c.register :tests, :root => Rails.root.join('test', 'coffeescript'), :output_prefix => 'test'
|
|
22
|
+
|
|
23
|
+
# Disable wrapping in a closure:
|
|
24
|
+
# c.bare = true
|
|
25
|
+
# ... or ...
|
|
26
|
+
# c.bare!
|
|
27
|
+
|
|
28
|
+
# Change the output root for a framework:
|
|
29
|
+
|
|
30
|
+
# c.change_output_prefix! 'framework-name', 'output-prefix'
|
|
31
|
+
|
|
32
|
+
# or for all frameworks...
|
|
33
|
+
|
|
34
|
+
# c.each_framework do |framework|
|
|
35
|
+
# c.change_output_prefix! framework, "vendor/#{framework.name}"
|
|
36
|
+
# end
|
|
37
|
+
|
|
38
|
+
# or, prefix the path for the app files:
|
|
39
|
+
|
|
40
|
+
# c.change_output_prefix! :default, 'my-app-name'
|
|
41
|
+
|
|
42
|
+
# or, change the directory the framework goes into full stop:
|
|
43
|
+
|
|
44
|
+
# c.change_output_prefix! :tests, Rails.root.join('spec', 'javascripts')
|
|
45
|
+
|
|
46
|
+
# or, hook into the compilation:
|
|
47
|
+
|
|
48
|
+
# c.before_compilation { |path| puts "Barista: Compiling #{path}" }
|
|
49
|
+
# c.on_compilation { |path| puts "Barista: Successfully compiled #{path}" }
|
|
50
|
+
# c.on_compilation_error { |path, output| puts "Barista: Compilation of #{path} failed with:\n#{output}" }
|
|
51
|
+
# c.on_compilation_with_warning { |path, output| puts "Barista: Compilation of #{path} had a warning:\n#{output}" }
|
|
52
|
+
|
|
53
|
+
# Turn off preambles and exceptions on failure:
|
|
54
|
+
|
|
55
|
+
# c.verbose = false
|
|
56
|
+
|
|
57
|
+
# Or, make sure it is always on
|
|
58
|
+
# c.verbose!
|
|
59
|
+
|
|
60
|
+
# If you want to use a custom JS file, you can as well
|
|
61
|
+
# e.g. vendoring CoffeeScript in your application:
|
|
62
|
+
# c.js_path = Rails.root.join('public', 'javascripts', 'coffee-script.js')
|
|
63
|
+
|
|
64
|
+
# Make helpers and the HAML filter output coffee-script instead of the compiled JS.
|
|
65
|
+
# Used in combination with the coffeescript_interpreter_js helper in Rails.
|
|
66
|
+
# c.embedded_interpreter = true
|
|
67
|
+
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
#
|
|
71
|
+
# All production environments pregenerate JS using the RPM build, development
|
|
72
|
+
# environments use autogeneration. To trigger autogeneration you may need to
|
|
73
|
+
# run 'rake assets:clean'.
|
|
74
|
+
#
|
|
75
|
+
if Rails.env.development?
|
|
76
|
+
Rails.configuration.middleware.delete('Barista::Filter')
|
|
77
|
+
Rails.configuration.middleware.insert_before('Rack::Sendfile', 'Barista::Filter')
|
|
78
|
+
options = {
|
|
79
|
+
:urls => ['/javascripts'],
|
|
80
|
+
:root => "#{Rails.root}/tmp"
|
|
81
|
+
}
|
|
82
|
+
Rails.configuration.middleware.insert_before('Rack::Sendfile', 'Rack::Static', options)
|
|
83
|
+
else
|
|
84
|
+
Rails.configuration.middleware.delete('Barista::Filter')
|
|
85
|
+
end
|
|
86
|
+
end
|