Skip to content

Instantly share code, notes, and snippets.

View kevprice83's full-sized avatar

Kevin kevprice83

  • Red Hat
  • Barcelona
View GitHub Profile
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Applink API",
"description": "Submit a sample application to the Applink API"
},
"host": "ec2-50-16-88-196.compute-1.amazonaws.com:8080",
"basePath": "/DataGatewayService.svc",
"schemes": [
2017/02/01 16:33:28 [info] 27029#0: [lua] resolver.lua:81: init_nameservers(): adding 8.8.8.8:53 as default nameserver
2017/02/01 16:33:28 [info] 27029#0: [lua] resolver.lua:81: init_nameservers(): adding 192.168.1.1:53 as default nameserver
2017/02/01 16:33:28 [notice] 27029#0: using the "kqueue" event method
2017/02/01 16:33:28 [notice] 27029#0: openresty/1.11.2.1 (no pool)
2017/02/01 16:33:28 [notice] 27029#0: built by clang 8.0.0 (clang-800.0.42.1)
2017/02/01 16:33:28 [notice] 27029#0: OS: Darwin 16.3.0
2017/02/01 16:33:28 [notice] 27029#0: hw.ncpu: 4
2017/02/01 16:33:28 [notice] 27029#0: net.inet.tcp.sendspace: 131072
2017/02/01 16:33:28 [notice] 27029#0: kern.ipc.somaxconn: 128
2017/02/01 16:33:28 [notice] 27029#0: getrlimit(RLIMIT_NOFILE): 4864:9223372036854775807
2017/02/01 16:46:44 [error] 27414#0: *5 lua entry thread aborted: runtime error: /Users/kevinprice/apicast/apicast/src/management.lua:40: attempt to index upvalue 'provider' (a userdata value)
stack traceback:
coroutine 0:
/Users/kevinprice/apicast/apicast/src/management.lua: in function 'f'
/usr/local/share/lua/5.1/router.lua:107: in function 'execute'
/Users/kevinprice/apicast/apicast/src/management.lua:110: in function 'call'
content_by_lua(management.conf:2):1: in function <content_by_lua(management.conf:2):1>, client: 127.0.0.1, server: _, request: "GET /config HTTP/1.1", host: "localhost:8090"
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"annotations": {
"openshift.io/display-name": "Redis"
}
},
"spec": {
@kevprice83
kevprice83 / swagger.json
Created March 22, 2017 11:52
Petstore Swagger spec
{
"swagger": "2.0",
"schemes": [
"http",
"https"
],
"host": "petstore.swagger.io",
"basePath": "/v2",
"info": {
"description": "This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n# Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Rebilly/ReDoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md).\n# OpenAPI Specification\nThis API is documented in **Open
@kevprice83
kevprice83 / README.md
Last active February 21, 2024 09:27
APIcast with RH SSO integration on OpenShift

RH SSO installation & configuration

download rhsso from https://access.redhat.com/jbossnetwork/restricted/softwareDownload.html?softwareId=44851

  • unzip rh-sso-7.0.0.zip
  • ./add-user-keycloak.sh -u <username>
  • From the directory rh-sso-7.0 execute bin/standalone.sh This will start up the sso instance
  • To expose the console on a public domain follow the next steps
  • wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
  • unzip ngrok-stable-linux-amd64.zip
@kevprice83
kevprice83 / README.md
Last active October 26, 2022 03:41
Developer portal solution for multiple services and scoped users

What is this?

  • This gist is a solution to build a developer portal in 3scale with a workflow that allows signup to services based on the scope of the user.
  • The template have been adapted from the default index.html page.
  • This solution is dependent on the correct settings being configured in the 3scale admin portal & the users being scoped by means of the Groups feature.
  • The Service Plan Features have been used in this solution instead of the Service system_name.
@kevprice83
kevprice83 / README.md
Last active October 26, 2022 03:41
Simple custom metric reporting for a SOAP service

How this works

This solution is based on a custom HTTP header being passed with all client requests, the value of that header should be the equivalent of the matching metric system name configured in 3scale.

This customisation has been tested with the following image of APIcast:

  • registry.access.redhat.com/3scale-amp20/apicast-gateway
@kevprice83
kevprice83 / README.md
Last active March 18, 2024 21:09
3scale Developer portal custom signup flows

Dynamic 3scale Developer Portal signup templates

There are 4 custom signup flows included in the parent homepage. These flows are included into the homepage using Liquid tags such as {% include 'partial name' %} because the flows are separated out into individual partials. The partials can be included in your 3scale portal individually or all together depending on which flows you want to enable in your portal and for ease of switching between flows as and when needed.

NOTE: If you prefer you can create a separate page to render the subscription forms to the different Services. This would be particularly useful if you want to allow multiple applications per account for the Custom Field & Group Membership Flows.

How does the 3scale signup work?

The Basics

A developer can sign up to subscribe to an API service in various ways

@kevprice83
kevprice83 / README.md
Created November 17, 2017 09:30 — forked from mayorova/README.md
Deploy 3scale AMP on OpenShift

Installing 3scale AMP2.1 on EC2

You will need:

  • a running instance with 8GB RAM minimum (recommended 16GB) and RHEL

  • <PUBLIC_DNS>: (e.g. ec2-54-123-456-78.compute-1.amazonaws.com)

  • ``: (e.g. 54.123.456.78)