CI Procedure for Adding a New Workflow Configuration(3.1)
Perform the following steps if you want to add a new workflow configuration to the CI pipeline:
- Export the configuration using the System Exporter(3.0) and set the property
Output as Directory
to theConfiguration
folder in the Git repository. Modify the
packages.xml
file and add a new section calledpackage name
=""version
="" with the corresponding sub-sections. See packageexport(3.0).
Set a new package name and version and point the configuration to your configuration as shown in the example below:Example - Modifying packages.xml file
<pipeline> <packages> <package name="TcpBased" version="1.1"> <configurations> <configuration foldername="TCP_Based"/> </configurations> </package> </packages> </pipeline>
Create a Helm chart with one or more ECDs that will run your configuration by following these steps:
Create an empty Helm chart in the Helm directory using the following command:
helm create [name of helm chart]
A new directory is created with the specified name.
- Delete all
.yaml
files in the templates directory in the new helm chart. Also delete the directory test inside thetemplates
directory. - Add your/yours ECD yaml file in the templates directory. If you don't have any ECD yaml file, you can create one using the Web Interface. Follow the steps to create an ECD of your choice and in the last step you will see a summary. Click on the Download button to download the yaml file of the ECD. Copy the yaml file into the
templates
directory. Add the following parameter in your ECD yaml file in the
templates
directory:ÂpackageImage: "{{ .Values.package.image }}"
See the following ECD as an example:
Example - ECD yaml file
metadata: name: "tcpbased" labels: version: v1 annotations: traffic.sidecar.istio.io/excludeOutboundPorts: "6790" apiVersion: "mz.digitalroute.com/v1alpha1" kind: "ECDeployment" spec: ecGroups: "tcpbased" jvmArgs: - "Xms512m" - "Xmx512m" exportJmxMetrics: false packageImage: "{{ .Values.package.image }}" resources: requests: memory: "640.0Mi" cpu: "100m" limits: memory: "640.0Mi" cpu: "200m" workflows: - template: "TCP_Based.client" packageName: "TcpBased" packageVersion: "1.1" instances: - name: "client1" useExtRef: "{}" parameters: "{\"port\":1234}" - template: "TCP_Based.server" packageName: "TcpBased" packageVersion: "1.1" instances: - name: "server1" useExtRef: "{}" parameters: "{\"port\":1234,\"id\":\"1\"}"
The
values.yaml
file in the helm chart directory must include the following value exactly as shown below. TheREPLACE_ME_WITH_PACKAGE_IMAGE
parameter will be replaced by the CI pipeline.package: image: REPLACE_ME_WITH_PACKAGE_IMAGE
See this
values.yaml
file as an example:Example - values.yaml file
# Default values for tcpecd. # This is a YAML-formatted file. # Declare variables to be passed into your templates. replicaCount: 1 package: image: REPLACE_ME_WITH_PACKAGE_IMAGE
Note!
All the default values created by Helm can be deleted if you don't want to use them.
Optional step: If there is a test corresponding to the configuration, it should be exported to the
Test
directory in the Git repository.Note!
Only export the test configuration, not the real configuration, into theTest
directory.
InSystem Exporter
, clearSelect Dependencies
and selectDirectory Output
.- Commit and push all files to Git. Then the Jenkins job can be started from Jenkins. The output from the job is accessed from the job view in Jenkins.