caapim / gateway-developer-example Goto Github PK
View Code? Open in Web Editor NEWRepo has been moved. Please go to https://github.com/Layer7-Community/Utilities/tree/main/policy-plugin-examples
License: MIT License
Repo has been moved. Please go to https://github.com/Layer7-Community/Utilities/tree/main/policy-plugin-examples
License: MIT License
How can I promote cluster-wide properties in Kubernetes .yml files?
Can you provide a corresponding Kubernetes .yml files of the docker-compose file?
I have mentioned cluster-wide in config map of the .yml file as
ENV.PROPERTY.gateway.":"value"
following is the error
Exception in thread "main" com.ca.apim.gateway.cagatewayconfig.environment.MissingEnvironmentException: Missing global environment value for property:
whenever I'm creating a bundle using gradlew build, the bundle contains a policy of the service present in the source gateway.
Hi
I am trying to use this example in order to export bundles from a Gateway, but I am getting Authentication Error when calling my restman endpoint.
Where should I configure the authentication credentials? When using a REST client, such as postman, to GET bundles, I just use basic authentication.
Thank you
Hi,
I have problems when trying to import exported entities.
Steps for reproduction:
Created clusterProperty and identityProviders with PolicyManager.
common-service build.gradle
GatewayExportConfig {
folderPath = '/common'
exportEntities = [
jdbcConnections:[ "pets-db" ],
clusterProperties:["cluster.env.name"],
identityProviders:["test-ldap"]
]
}
exported with
gradlew export
Content of the first file: common-services\src\main\gateway\config\env.properties
gateway.cluster.env.name=dev-loc
Content of the second file: common-services\src\main\gateway\config\identity-providers.yml
test-ldap:
type: "BIND_ONLY_LDAP"
identityProviderDetail:
serverUrls:
- "ldaps://ldap.url:636"
useSslClientAuthentication: false
bindPatternPrefix: ""
bindPatternSuffix: ""
Stopped local image.
Executed gradlew export
Executed docker-compose.up
Startup log:
λ docker-compose up
Starting gateway-developer-example_gateway-dev_1 ... done
Attaching to gateway-developer-example_gateway-dev_1
gateway-dev_1 | Using Derby database
gateway-dev_1 | SSG_JVM_HEAP will be 2g
gateway-dev_1 | SSG_CLUSTER_HOST will be localhost
gateway-dev_1 | Expanding GW7 Package /opt/docker/rc.d/deployment.gw7
gateway-dev_1 | Running script /opt/docker/rc.d/apply-environment.sh
gateway-dev_1 | [main] INFO org.reflections.Reflections - Reflections took 133 ms to scan 2 urls, producing 35 keys and 238 values
gateway-dev_1 | Exception in thread "main" com.ca.apim.gateway.cagatewayconfig.environment.MissingEnvironmentException: Missing global environment value for property: cluster.env.name
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.BundleEnvironmentValidator.findInBundle(BundleEnvironmentValidator.java:81)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.BundleEnvironmentValidator.validateElement(BundleEnvironmentValidator.java:70)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.BundleEnvironmentValidator.lambda$validateEnvironmentProvided$0(BundleEnvironmentValidator.java:53)
gateway-dev_1 | at java.util.ArrayList.forEach(ArrayList.java:1257)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.BundleEnvironmentValidator.validateEnvironmentProvided(BundleEnvironmentValidator.java:50)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.EnvironmentBundleUtils.processTemplatizedBundle(EnvironmentBundleUtils.java:45)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.EnvironmentBundleUtils.lambda$processDeploymentBundles$0(EnvironmentBundleUtils.java:34)
gateway-dev_1 | at java.util.ArrayList.forEach(ArrayList.java:1257)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.EnvironmentBundleUtils.processDeploymentBundles(EnvironmentBundleUtils.java:34)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.EnvironmentBundleCreator.createEnvironmentBundle(EnvironmentBundleCreator.java:57)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.EnvironmentCreatorApplication.run(EnvironmentCreatorApplication.java:85)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.EnvironmentCreatorApplication.main(EnvironmentCreatorApplication.java:64)
gateway-dev_1 | ERROR - Failed executing the script: /opt/docker/rc.d/apply-environment.sh
gateway-developer-example_gateway-dev_1 exited with code 1
If identityProvider is exported and used for build, following error is visible in startup log:
λ docker-compose up
Starting gateway-developer-example_gateway-dev_1 ... done
Attaching to gateway-developer-example_gateway-dev_1
gateway-dev_1 | Using Derby database
gateway-dev_1 | SSG_JVM_HEAP will be 2g
gateway-dev_1 | SSG_CLUSTER_HOST will be localhost
gateway-dev_1 | Expanding GW7 Package /opt/docker/rc.d/deployment.gw7
gateway-dev_1 | Running script /opt/docker/rc.d/apply-environment.sh
gateway-dev_1 | [main] INFO org.reflections.Reflections - Reflections took 101 ms to scan 2 urls, producing 35 keys and 238 values
gateway-dev_1 | Exception in thread "main" com.ca.apim.gateway.cagatewayconfig.environment.MissingEnvironmentException: Missing environment value for ID_PROVIDER_CONFIG: test-ldap
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.BundleEnvironmentValidator.findInBundle(BundleEnvironmentValidator.java:110)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.BundleEnvironmentValidator.validateElement(BundleEnvironmentValidator.java:70)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.BundleEnvironmentValidator.lambda$validateEnvironmentProvided$0(BundleEnvironmentValidator.java:53)
gateway-dev_1 | at java.util.ArrayList.forEach(ArrayList.java:1257)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.BundleEnvironmentValidator.validateEnvironmentProvided(BundleEnvironmentValidator.java:50)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.EnvironmentBundleUtils.processTemplatizedBundle(EnvironmentBundleUtils.java:45)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.EnvironmentBundleUtils.lambda$processDeploymentBundles$0(EnvironmentBundleUtils.java:34)
gateway-dev_1 | at java.util.ArrayList.forEach(ArrayList.java:1257)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.EnvironmentBundleUtils.processDeploymentBundles(EnvironmentBundleUtils.java:34)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.environment.EnvironmentBundleCreator.createEnvironmentBundle(EnvironmentBundleCreator.java:57)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.EnvironmentCreatorApplication.run(EnvironmentCreatorApplication.java:85)
gateway-dev_1 | at com.ca.apim.gateway.cagatewayconfig.EnvironmentCreatorApplication.main(EnvironmentCreatorApplication.java:64)
gateway-dev_1 | ERROR - Failed executing the script: /opt/docker/rc.d/apply-environment.sh
OS: Windows 10 Professional
CA API Gateway 9.4.00
Thanks in advance for your help
gradle build
fails with the following exception:
Where:
Build file '.../gateway-developer-example/build.gradle' line: 8
What went wrong:
An exception occurred applying plugin request [id: 'com.ca.apim.gateway.gateway-developer-plugin', version: '0.5.00']
Failed to apply plugin [id 'com.ca.apim.gateway.gateway-developer-plugin']
No value has been specified for this provider.
<snip>
What am i missing?
./gradlew build
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/pedro/git/gateway-developer-example/deployment/build.gradle' line: 97
* What went wrong:
A problem occurred configuring project ':deployment'.
> Could not get unknown property 'outputBundle' for task ':deployment:build-full-bundle' of type com.ca.apim.gateway.cagatewayconfig.BuildFullBundleTask.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.