Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-5515

"Adding custom policies to APIcast" procedure fails on OCP 4

    XMLWordPrintable

Details

    • 5
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Content Services
    • Hide

      Users can register a policy as a configmap.

      Here is an example of registering apicast-example-policy.
      1) fork the repository
      2) $ git clone <forked repository>
      3) $ cd apicast-example-policy
      4) $ oc login <OpenShift URL>
      5) $ oc project <3scale Porject>
      6) $ oc create configmap example-policy --from-file=policies/example/0.1

      This configmap will include apicast-policy.json, example.lua and init.lua files.

      7)
      $ oc set volumes dc/apicast-staging --add --overwrite --name=example-policy \
      --mount-path=/opt/app-root/src/policies/example/0.1 --source='{"configMap":{"name":"example-policy"}}'

      The default policy load path is /opt/app-root/src/policies. To change the path, set a path as APICAST_POLICY_LOAD_PATH environment variables.

      Show
      Users can register a policy as a configmap. Here is an example of registering apicast-example-policy . 1) fork the repository 2) $ git clone <forked repository> 3) $ cd apicast-example-policy 4) $ oc login <OpenShift URL> 5) $ oc project <3scale Porject> 6) $ oc create configmap example-policy --from-file=policies/example/0.1 This configmap will include apicast-policy.json, example.lua and init.lua files. 7) $ oc set volumes dc/apicast-staging --add --overwrite --name=example-policy \ --mount-path=/opt/app-root/src/policies/example/0.1 --source='{"configMap":{"name":"example-policy"}}' The default policy load path is /opt/app-root/src/policies. To change the path, set a path as APICAST_POLICY_LOAD_PATH environment variables.

    Description

      4.4. Adding custom policies to APIcast fails on OCP 4.2

      • oc secrets link builder threescale-registry-auth is rerequired before this command:
        oc start-build apicast-example-policy
      • oc start-build apicast-custom-policies fails:
      STEP 6: RUN bin/apicast --test --lazy
      (snip)
      nginx: [emerg] open() "/dev/stdout" failed (13: Permission denied)
      nginx: configuration file /tmp/lua_ZUMWT5 test failed
      

      I will test another version and add the results.

      Also tested by a customer on OCP 4.5
      Customer determined that /dev/pts/ is not being populated which indicates the tty option/flag is not getting set.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rhn-support-tkonishi Takayuki Konishi
              Priscill Orue Priscill Orue
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: