
Many companies are modernising their systems as part of the mobilisation and digitisation of the business. DevOps concepts are being employed to increase the delivery velocity of modern applications to the business. With DevOps, it is critical to automate all aspects of deploying new software features. The time required for manual steps adds up and defeats DevOps goals. In the example below, we have automated API and policy management to speed deployment, introduce continuous integration concepts, and place API artifacts under source code management.
In an effort towards modernisation of the API and the organization moving towards Agile from the traditional waterfall, DevOps is becoming essential in making sure the development and operations team work towards a common goal. Achieving continuous integration and delivery is key and is aided by multiple tools in the market. As each organization builds APIs for easy consumption and monetisation, continuous integration and delivery is an integral part of the solution to enable fast to market.
The following steps depict how you can achieve continuous integration and delivery for CA API Gateway, which is widely used across multiple industries for exposing APIs and more importantly to secure the APIs:
1. Develop a policy in policy manager
2. Export a Policy: Export the policy XML using a headless java utility called Gateway Migration Utility, available from CA, and check in the artifacts
2. Export a Policy: Export the policy XML using a headless java utility called Gateway Migration Utility, available from CA, and check in the artifacts
- Create an argFile.properties with the below arguments
- host – host name of the gateway from which the policy has to be exported
- port – Port number to connect to the gateway
- username – username to connect to the gateway
- password – encoded password of the gateway
- format – specify as a single file if the export is for policy file or folder for a folder
- dest= policy XML name for storing the XML
- serviceName= Actual Policy name in the gateway
- encryptionPassphrase – Passphrase for encryption
- GatewayMigrationUtility.sh browse -z argFile.properties -r –showIds – this should list all the policies running in the gateway.
- GatewayMigrationUtility.sh migrateOut –argFile argFile.properties
5. Externalise the variable with the values from the exported policy XML using the below command
- GatewayMigrationUtility.sh template –bundle policyAPI.xml –template policyTemplate-.properties – This will create the template properties file with the key/value pair having variable names and corresponding values, and the values in the file can be modified with specific environment properties.
6. Create a Mapping file for the mappings. These are used to specify the action to be used for a given type and the srcId when importing to different environments.
- Copy the mappings section from the bundle file
- Save the mappings as policyAPIMappings.xml
- Modify the properties for the type as required
7. Check in the policy XML, Mappings XML, argFile properties file, and template property files to the code repository
8. Import a Policy: Configure Jenkins to poll the files for the policy from the code repository

9. Package the artifacts (policy XML, mappings XML, argFile, and template properties file ) to artifactory or any build file storage


10. Configure SSH to send the files over to the build server and execute the migrate in command as below

11. Configure the test cases for the policy as a test suite to execute the test cases after the migration to the target gateway and publish the results
Note: The above example uses credentials (username/password) of the gateway to import and export the policy out of the gateway. You can do this using the certs as a mechanism to import /export the policy.
Reference: CA API Gateway Documentation
It is necessary to automate deployment for all components to optimize the velocity of software innovation. In the example above we have eliminated a manual step associated with API deployment.
Reference: CA API Gateway Documentation
It is necessary to automate deployment for all components to optimize the velocity of software innovation. In the example above we have eliminated a manual step associated with API deployment.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.