Uploaded image for project: 'OpenShift Java Client'
  1. OpenShift Java Client
  2. OSJC-65

openshift-java-client: allow users to list quickstarts

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.6.0
    • 2.5.0
    • None

      For QuickStarts, brokers may choose to

      a) enable community quickstarts
      (the URL you saw below, set by COMMUNITY_QUICKSTART_URL being a URL in /etc/openshift/broker.conf)
      b) enable their own list of quickstarts
      (a different url, /broker/rest/quickstarts, configured from /etc/openshift/quickstarts.json)
      c) disable the quickstarts link
      (delete /etc/openshift/quickstarts.json)

      To correctly fetch the quickstarts for a server, retrieve the API document

      /broker/rest/api

      and look for the LIST_QUICKSTARTS link. If it is present, you may retrieve quickstarts. If it is absent, you should assume there are no quickstarts.

      Retrieving the list of quickstarts, unlike other REST API feed calls, is very specific:

      • API versioning is not supported
      • Only JSON is supported
      • The body of the response is slightly different than standard REST API feed results
      • If you encounter a parse error or an unexpected data value you are required to handle it gracefully by omitting the entry - the API may change without warning (although hopefully not)

      The format of the JSON response (in either a) or b) above) is:

      {
        data: [
          quickstart: {
            id: "<string id>",
            href: "<absolute URL to a display URL for the quickstart>",
            name: "<name>",
            updated: "<last update date in seconds from the epoch>",
            summary: "<brief HTML body of the item>",
            body: "<full HTML body of the item>",
            cartridges: "<cartridge spec>",
            website: "<URL of metadata about the source of the quickstart or the technology>",
            tags: "<comma delimited list of tags>",
            language: "<display name of the type of quickstart>",
            initial_git_url: "<absolute URL or Git reference to source>",
            provider: "openshift|reviewed|partner|community", # default is community
          },
        ]
      }
      

      You should assume that arbitrary content could be injected into any of these fields and defend yourself against XSS appropriately. You should also assume that the structure could be changed at any time.

      Cartridge spec:

      The cartridge spec is defined as either:

      a) a comma delimited list of cartridge name search conditions
      b) a string containing a JSON array

      If the leading character of the cartridge spec is '[', you must convert the cartridge spec to JSON and submit the value provided to the server on creation as the "cartridges" field.

      Otherwise,
      1) split the string by "," into "segments"
      2) trim whitespace from each segment
      3) split each segment by "|" into "matches" - these represent logical ORs
      4) strip leading and trailing "*" characters
      5) For each segment, return all cartridges that have a case-insensitive substring match on any of the "matches" in that segment for the user to select.

      See https://github.com/openshift/origin-server/blob/77e1d3a6476ecb9dad5be6dea80abf34ea8f6269/console/app/models/application_type.rb#L62
      and https://github.com/openshift/origin-server/blob/77e1d3a6476ecb9dad5be6dea80abf34ea8f6269/console/app/models/application_type.rb#L173

      The broker is currently providing the following json response:

      {
          "data": [
              {
                  "quickstart": {
                      "id": "12724",
                      "href": "https://www.openshift.com/quickstarts/wordpress-3x",
                      "name": "WordPress 3.x",
                      "updated": "1384188475",
                      "summary": "A semantic personal publishing platform written in PHP with a MySQL back end, focusing on aesthetics, web standards, and usability.  Currently using version 3.7.1.\n\nThe first time you access the app you'll be asked to set a username and password and give your blog a name.  Be sure to track security updates from upstream.",
                      "body": "<p>A semantic personal publishing platform written in PHP with a MySQL back end, focusing on aesthetics, web standards, and usability.  Currently using version 3.7.1.</p>\n\n<p>The first time you access the app you'll be asked to set a username and password and give your blog a name.  Be sure to track security updates from upstream.</p>",
                      "cartridges": "php-*, mysql-*",
                      "website": "http://wordpress.org",
                      "tags": "blog, cms, instant_app, not_scalable",
                      "language": "PHP",
                      "initial_git_url": "git://github.com/openshift/wordpress-example.git",
                      "provider": "openshift"
                  }
              },
              {
                  "quickstart": {
                      "id": "12726",
                      "href": "https://www.openshift.com/quickstarts/ruby-on-rails",
                      "name": "Ruby on Rails",
                      "updated": "1390818737",
                      "summary": "An open source web framework for Ruby that is optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration.",
                      "body": "<p>An open source web framework for Ruby that is optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration.</p>",
                      "cartridges": "ruby-1.9, mysql",
                      "website": "http://rubyonrails.org/",
                      "priority": "-1",
                      "tags": "framework, rails, ruby",
                      "language": "Ruby",
                      "initial_git_url": "git://github.com/openshift/rails-example.git",
                      "provider": "openshift"
                  }
              },
              {
                  "quickstart": {
                      "id": "12729",
                      "href": "https://www.openshift.com/quickstarts/capedwarf",
                      "name": "CapeDwarf",
                      "updated": "1387202776",
                      "summary": "Deploy and run your Java App Engine applications on your own private JBoss Application Server (AS7) on Red Hat's OpenShift cloud.\n\nJBoss CapeDwarf is an implementation of the Google App Engine API, which allows applications to be deployed on JBoss Application Servers without modification. Behind the scenes, CapeDwarf uses existing JBoss APIs such as Infinispan, JGroups, PicketLink, HornetQ and others.\n\nThe ultimate goal of the CapeDwarf project is to fully implement all the APIs of the Google App Engine.\n\nCreating this quickstart may take several minutes. You may need to restart the application once the database is configured.",
                      "body": "https://www.openshift.com/sites/default/files/capedwarf-banner-1180px.png",
                      "cartridges": "jbossas-",
                      "website": "http://www.jboss.org/capedwarf",
                      "tags": "app_engine, google, java",
                      "language": "Java",
                      "initial_git_url": "git://github.com/openshift/capedwarf-example.git",
                      "provider": "openshift"
                  }
              },
              {
                  "quickstart": {
                      "id": "12730",
                      "href": "https://www.openshift.com/quickstarts/django",
                      "name": "Django",
                      "updated": "1386935507",
                      "summary": "A high-level Python web framework that encourages rapid development and clean, pragmatic design.\n\nDuring application creation the Django admin username and password will be written to a file called CREDENTIALS in your data directory.  You will need to SSH into your application to access these credentials.",
                      "body": "<p>A high-level Python web framework that encourages rapid development and clean, pragmatic design.</p>\n\n<p>During application creation the Django admin username and password will be written to a file called CREDENTIALS in your data directory.  You will need to SSH into your application to access these credentials.</p>",
                      "cartridges": "python-2|python-3",
                      "website": "https://www.djangoproject.com/",
                      "tags": "framework, python",
                      "language": "Python",
                      "initial_git_url": "git://github.com/openshift/django-example.git",
                      "provider": "openshift"
                  }
              },
              {
                  "quickstart": {
                      "id": "12731",
                      "href": "https://www.openshift.com/quickstarts/cakephp",
                      "name": "CakePHP",
                      "updated": "1365008335",
                      "summary": "CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.",
                      "body": "<p>CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.</p>",
                      "cartridges": "php-, mysql-",
                      "website": "http://cakephp.org/",
                      "tags": "framework, not_scalable, php",
                      "language": "PHP",
                      "initial_git_url": "git://github.com/openshift/cakephp-example.git",
                      "provider": "openshift"
                  }
              },
              {
                  "quickstart": {
                      "id": "13145",
                      "href": "https://www.openshift.com/quickstarts/drupal-7",
                      "name": "Drupal 7",
                      "updated": "1365008311",
                      "summary": "An open source content management platform written in PHP powering millions of websites and applications. It is built, used, and supported by an active and diverse community of people around the world. This quickstart will download and install the most recent stable version of Drupal and then generate a new site for you.  Your administrative username and password will default to admin/openshift_changeme, so don't forget to alter them once you log in!\n\nWithout sharing a filesystem, Drupal can't be web scaled, but the README.md describes a workaround that will allow you to scale if you don't need direct file upload into Drupal.\n\nCreating this quickstart may take several minutes.  You may need to restart the application once the database is configured. NOTE: If you want to run the Drupal cron tasks, please install the cron cartridge.",
                      "body": "<p>An open source content management platform written in PHP powering millions of websites and applications. It is built, used, and supported by an active and diverse community of people around the world. This quickstart will download and install the most recent stable version of Drupal and then generate a new site for you.  Your administrative username and password will default to admin/openshift_changeme, so don't forget to alter them once you log in!</p>\n\n<p>Without sharing a filesystem, Drupal can't be web scaled, but the <a href=\"https://github.com/openshift/drupal-quickstart/blob/master/README.md\">README.md</a> describes a workaround that will allow you to scale if you don't need direct file upload into Drupal.</p>\n\n<p>Creating this quickstart may take several minutes.  You may need to restart the application once the database is configured. NOTE: If you want to run the Drupal cron tasks, please install the cron cartridge.</p>",
                      "cartridges": "php-*, mysql-*",
                      "website": "http://drupal.org/",
                      "tags": "cms, drupal, instant_app, not_scalable, php",
                      "language": "PHP",
                      "initial_git_url": "https://github.com/openshift/drupal-quickstart.git",
                      "provider": "openshift"
                  }
              },
              {
                  "quickstart": {
                      "id": "13939",
                      "href": "https://www.openshift.com/quickstarts/revealjs",
                      "name": "Reveal.js",
                      "updated": "1384189269",
                      "summary": "An open source framework for easily creating beautiful presentations using HTML.\n\nreveal.js comes with a broad range of features including nested slides, markdown contents, PDF export, speaker notes and a JavaScript API.\n\nIt's best viewed in a browser with support for CSS 3D transforms but fallbacks are available to make sure your presentation can still be viewed elsewhere.\n\nMore information about reveal.js:\n\n\nReveal.js: Source code of reveal.js framework.\nExamples: Presentations created with reveal.js.\nBrowser Support: Explanation of browser support and fallbacks.\n\n\nRelated blog post\n\nGoodbye Powerpoint Hello Reveal.js",
                      "body": "<p>An open source framework for easily creating beautiful presentations using HTML.</p>\n\n<p>reveal.js comes with a broad range of features including nested slides, markdown contents, PDF export, speaker notes and a JavaScript API.</p>\n\n<p>It's best viewed in a browser with support for CSS 3D transforms but fallbacks are available to make sure your presentation can still be viewed elsewhere.</p>\n\n<p>More information about reveal.js:</p>\n\n<ul>\n<li><a href=\"https://github.com/hakimel/reveal.js/\" rel=\"nofollow\">Reveal.js</a>: Source code of reveal.js framework.</li>\n<li><a href=\"https://github.com/hakimel/reveal.js/wiki/Example-Presentations\" rel=\"nofollow\">Examples</a>: Presentations created with reveal.js.</li>\n<li><a href=\"https://github.com/hakimel/reveal.js/wiki/Browser-Support\" rel=\"nofollow\">Browser Support</a>: Explanation of browser support and fallbacks.</li>\n</ul>\n\n<h4>Related blog post</h4>\n\n<p><a href=\"https://www.openshift.com/blogs/goodbye-powerpoint-hello-revealjs\" rel=\"nofollow\">Goodbye Powerpoint Hello Reveal.js</a></p>",
                      "cartridges": "php-5",
                      "website": "http://lab.hakim.se/reveal-js/",
                      "tags": "css3, html5, php, presentations",
                      "language": "JavaScript",
                      "initial_git_url": "https://github.com/openshift-quickstart/reveal.js-openshift-quickstart",
                      "provider": "trusted"
                  }
              },
              {
                  "quickstart": {
                      "id": "14576",
                      "href": "https://www.openshift.com/quickstarts/cartridge-development-kit",
                      "name": "Cartridge Development Kit",
                      "updated": "1380291592",
                      "summary": "Helps you build and deploy your own custom cartridges - the CDK hosts your cartridge source AND allows you to easily deploy that cartridge directly to OpenShift.\n\nFor more info check out the README in the source repository.",
                      "body": "<p>Helps you build and deploy your own custom cartridges - the CDK hosts your cartridge source AND allows you to easily deploy that cartridge directly to OpenShift.</p>\n\n<p>For more info check out the <a href=\"https://github.com/smarterclayton/openshift-cdk-cart\">README in the source repository</a>.</p>",
                      "cartridges": "[{&quot;url&quot;: &quot;http://cdk-claytondev.rhcloud.com/manifest/master#cdk&quot;}]",
                      "website": "https://github.com/smarterclayton/openshift-cdk-cart",
                      "admin_tags": "custom",
                      "tags": "not_scalable",
                      "language": "Other",
                      "provider": "openshift"
                  }
              },
              {
                  "quickstart": {
                      "id": "15289",
                      "href": "https://www.openshift.com/quickstarts/go-language",
                      "name": "Go Language",
                      "updated": "1380286677",
                      "summary": "A web framework cartridge for the Go language, supporting the high performance compiled language.  Downloads the latest Go 1.1 distribution into your repository which may take several minutes.\n\nAn example application is included - change the \".godir\" file in your source repository to define your own package.",
                      "body": "<p>A web framework cartridge for the Go language, supporting the high performance compiled language.  Downloads the latest Go 1.1 distribution into your repository which may take several minutes.</p>\n\n<p>An example application is included - change the \".godir\" file in your source repository to define your own package.</p>",
                      "cartridges": "[{&quot;url&quot; : &quot;https://cartreflect-claytondev.rhcloud.com/github/smarterclayton/openshift-go-cart#golang&quot;}]",
                      "website": "http://www.golang.org",
                      "tags": "framework, google",
                      "language": "Other",
                      "provider": "trusted"
                  }
              },
              {
                  "quickstart": {
                      "id": "15549",
                      "href": "https://www.openshift.com/quickstarts/aerogear-push-0x",
                      "name": "AeroGear Push 0.X",
                      "updated": "1378313842",
                      "summary": "The AeroGear UnifiedPush Server allows for sending native push messages to different mobile operation systems. This initial community version of the server supports Apple’s Push Notification Service (APNs), Google Cloud Messaging (GCM) and Mozilla’s SimplePush.\n\nIt has a built in administrative console that makes it easy for developers of any type to create and manage push related aspects of their applications.",
                      "body": "<p>The AeroGear UnifiedPush Server allows for sending native push messages to different mobile operation systems. This initial community version of the server supports Apple’s Push Notification Service (APNs), Google Cloud Messaging (GCM) and Mozilla’s SimplePush.</p>\n\n<p>It has a built in administrative console that makes it easy for developers of any type to create and manage push related aspects of their applications. This means whether you are developing native mobile applications, hybrid applications such as with Apache Cordova, or mobile/desktop web applications, the AeroGear Push server can make push messaging easier.</p>\n\n<p>As part of the cartridge there is also an implementation of Mozilla's SimplePush server which allows for push notification to Firefox OS, as well as traditional browsers using our JavaScript libraries.</p>\n\n<p>The accompanying links and documentation contain everything you need to get started including client SDKs, sender API,  admin console guide, examples, and more.</p>\n\n<p>Please contact the AeroGear community with any feedback, requests, or contributions for this open source push service at <a href=\"http://aerogear.org\" title=\"http://aerogear.org\">http://aerogear.org</a></p>",
                      "cartridges": "[{&quot;url&quot;:&quot;https://cartreflect-claytondev.rhcloud.com/reflect?github=aerogear/openshift-origin-cartridge-aerogear-push#AeroGear&quot;}, &quot;mysql-5&quot;]",
                      "icon": "https://www.openshift.com/sites/default/files/quickstarts/aerogear_icon.png",
                      "website": "http://aerogear.org/",
                      "admin_tags": "new, featured",
                      "tags": "instant_app, java, messaging, not_scalable",
                      "language": "Java",
                      "provider": "openshift"
                  }
              },
              {
                  "quickstart": {
                      "id": "16766",
                      "href": "https://www.openshift.com/quickstarts/wildfly-8",
                      "name": "WildFly 8",
                      "updated": "1387811786",
                      "summary": "WildFly is a flexible, lightweight, managed application runtime that helps you build amazing applications.\n\nThis cartridge provides WIldFly 8.0.0.CR1",
                      "body": "<p>WildFly is a flexible, lightweight, managed application runtime that helps you build amazing applications.</p>\n\n<p>This cartridge provides WIldFly 8.0.0.CR1</p>",
                      "cartridges": "https://raw.github.com/openshift-cartridges/openshift-wildfly-cartridge/master/metadata/manifest.yml#Wildfly8",
                      "website": "http://www.wildfly.org",
                      "tags": "java, java_ee, jboss",
                      "language": "Java",
                      "provider": "trusted"
                  }
              }
          ]
      }
      

              adietish@redhat.com André Dietisheim
              adietish@redhat.com André Dietisheim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: