├── helm └── micro-integrator │ ├── templates │ ├── NOTES.txt │ ├── service.yaml │ ├── ingress.yaml │ ├── _helpers.tpl │ └── deployment.yaml │ ├── plans │ ├── medium.yaml │ └── small.yaml │ ├── Chart.yaml │ ├── plans.yaml │ ├── bind.yaml │ └── values.yaml ├── .gitignore ├── issue_template.md ├── pull_request_template.md ├── LICENSE └── README.md /helm/micro-integrator/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Thank you for installing WSO2 Micro Integrator. 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | *.tgz 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | 25 | .DS_Store 26 | # Common VCS dirs 27 | .git/ 28 | .gitignore 29 | .bzr/ 30 | .bzrignore 31 | .hg/ 32 | .hgignore 33 | .svn/ 34 | # Common backup files 35 | *.swp 36 | *.bak 37 | *.tmp 38 | *~ 39 | # Various IDEs 40 | .project 41 | .idea/ 42 | *.tmproj 43 | .vscode/ 44 | -------------------------------------------------------------------------------- /helm/micro-integrator/plans/medium.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | resources: 16 | requests: 17 | cpu: 2000m 18 | memory: 2Gi 19 | -------------------------------------------------------------------------------- /helm/micro-integrator/plans/small.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | resources: 16 | requests: 17 | cpu: 1000m 18 | memory: 1Gi 19 | -------------------------------------------------------------------------------- /helm/micro-integrator/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | apiVersion: v1 15 | appVersion: "1.1.0" 16 | description: A Helm chart for WSO2 Micro Integrator 17 | name: micro-integrator 18 | version: 0.1.0 19 | -------------------------------------------------------------------------------- /issue_template.md: -------------------------------------------------------------------------------- 1 | **Description:** 2 | 3 | 4 | **Suggested Labels:** 5 | 6 | 7 | **Suggested Assignees:** 8 | 9 | 10 | **Affected Product Version:** 11 | 12 | **OS, DB, other environment details and versions:** 13 | 14 | **Steps to reproduce:** 15 | 16 | 17 | **Related Issues:** 18 | -------------------------------------------------------------------------------- /helm/micro-integrator/plans.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - name: "small" 15 | description: "default (small) plan for WSO2 Micro Integrator" 16 | file: "small.yaml" 17 | - name: "medium" 18 | description: "medium sized plan for WSO2 Micro Integrator" 19 | file: "medium.yaml" 20 | -------------------------------------------------------------------------------- /helm/micro-integrator/bind.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | template: | 16 | { 17 | hostname: $.services[0].metadata.labels["nginx.ingress.hostname"], 18 | releaseName: $.services[0].metadata.labels["app.kubernetes.io/instance"], 19 | namespace: $.services[0].metadata.namespace 20 | } 21 | -------------------------------------------------------------------------------- /helm/micro-integrator/templates/service.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | apiVersion: v1 15 | kind: Service 16 | metadata: 17 | name: {{ include "micro-integrator.fullname" . }} 18 | labels: 19 | "nginx.ingress.hostname": {{ .Values.ingress.host }} 20 | {{ include "micro-integrator.labels" . | indent 4 }} 21 | spec: 22 | type: {{ .Values.service.type }} 23 | ports: 24 | - port: {{ .Values.service.port }} 25 | targetPort: http 26 | protocol: TCP 27 | name: http 28 | selector: 29 | app.kubernetes.io/name: {{ include "micro-integrator.name" . }} 30 | app.kubernetes.io/instance: {{ .Release.Name }} 31 | -------------------------------------------------------------------------------- /helm/micro-integrator/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | {{ if .Values.ingress.enabled }} 16 | apiVersion: extensions/v1beta1 17 | kind: Ingress 18 | metadata: 19 | {{ $fullName := include "micro-integrator.fullname" . }} 20 | name: {{ $fullName }} 21 | labels: 22 | {{ include "micro-integrator.labels" . | indent 4 }} 23 | annotations: 24 | kubernetes.io/ingress.class: nginx 25 | {{- with .Values.ingress.annotations }} 26 | {{- toYaml . | nindent 4 }} 27 | {{- end }} 28 | spec: 29 | tls: 30 | - hosts: 31 | - {{ .Values.ingress.host }} 32 | {{- if .Values.ingress.secret }} 33 | secretName: {{ .Values.ingress.secret }} 34 | {{- end }} 35 | rules: 36 | - host: {{ .Values.ingress.host }} 37 | http: 38 | paths: 39 | - path: / 40 | backend: 41 | serviceName: {{ $fullName }} 42 | servicePort: {{ .Values.service.port }} 43 | {{ end }} 44 | -------------------------------------------------------------------------------- /helm/micro-integrator/values.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # number of Micro Integrator pods 16 | replicaCount: 1 17 | 18 | images: 19 | microIntegrator: 20 | image: "wso2/micro-integrator" 21 | imageTag: "1.1.0" 22 | pullPolicy: IfNotPresent 23 | initContainer: 24 | image: "busybox" 25 | imageTag: "1.31" 26 | 27 | capp: 28 | # remote localtion for CApp 29 | urls: "" 30 | 31 | #imagePullSecrets: [] 32 | nameOverride: "" 33 | fullnameOverride: "" 34 | 35 | livenessProbe: 36 | initialDelaySeconds: 35 37 | periodSeconds: 10 38 | 39 | readinessProbe: 40 | initialDelaySeconds: 35 41 | periodSeconds: 10 42 | 43 | minReadySeconds: 35 44 | 45 | strategy: 46 | rollingUpdate: 47 | maxSurge: 1 48 | maxUnavailable: 0 49 | 50 | service: 51 | # Micro Integrator service type 52 | type: ClusterIP 53 | # Micro Integrator service port 54 | port: 8290 55 | 56 | ingress: 57 | # enable an ingress to expose. If enabled, must set the service type to "ClusterIP". 58 | enabled: true 59 | # annotations for Ingress 60 | annotations: {} 61 | # Host name of the ingress 62 | host: "{{ .Release.Name }}.example.com" 63 | # secret: "" 64 | 65 | resources: 66 | limits: 67 | cpu: 2000m 68 | memory: 2Gi 69 | requests: 70 | cpu: 1000m 71 | memory: 1Gi 72 | # deployment.toml remote location 73 | deploymentTomlURL: "" 74 | -------------------------------------------------------------------------------- /helm/micro-integrator/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* 2 | Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */}} 13 | {{/* vim: set filetype=mustache: */}} 14 | {{/* 15 | Expand the name of the chart. 16 | */}} 17 | {{- define "micro-integrator.name" -}} 18 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 19 | {{- end -}} 20 | 21 | {{/* 22 | Create a default fully qualified app name. 23 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 24 | If release name contains chart name it will be used as a full name. 25 | */}} 26 | {{- define "micro-integrator.fullname" -}} 27 | {{- if .Values.fullnameOverride -}} 28 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 29 | {{- else -}} 30 | {{- $name := default .Chart.Name .Values.nameOverride -}} 31 | {{- if contains $name .Release.Name -}} 32 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 33 | {{- else -}} 34 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 35 | {{- end -}} 36 | {{- end -}} 37 | {{- end -}} 38 | 39 | {{/* 40 | Create chart name and version as used by the chart label. 41 | */}} 42 | {{- define "micro-integrator.chart" -}} 43 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 44 | {{- end -}} 45 | 46 | {{/* 47 | Common labels 48 | */}} 49 | {{- define "micro-integrator.labels" -}} 50 | app.kubernetes.io/name: {{ include "micro-integrator.name" . }} 51 | helm.sh/chart: {{ include "micro-integrator.chart" . }} 52 | app.kubernetes.io/instance: {{ .Release.Name }} 53 | {{- if .Chart.AppVersion }} 54 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 55 | {{- end }} 56 | app.kubernetes.io/managed-by: {{ .Release.Service }} 57 | {{- end -}} 58 | -------------------------------------------------------------------------------- /pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Purpose 2 | > Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc. 3 | 4 | ## Goals 5 | > Describe the solutions that this feature/fix will introduce to resolve the problems described above 6 | 7 | ## Approach 8 | > Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here. 9 | 10 | ## User stories 11 | > Summary of user stories addressed by this change> 12 | 13 | ## Release note 14 | > Brief description of the new feature or bug fix as it will appear in the release notes 15 | 16 | ## Documentation 17 | > Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact 18 | 19 | ## Training 20 | > Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable 21 | 22 | ## Certification 23 | > Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why. 24 | 25 | ## Marketing 26 | > Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable 27 | 28 | ## Automation tests 29 | - Unit tests 30 | > Code coverage information 31 | - Integration tests 32 | > Details about the test cases and coverage 33 | 34 | ## Security checks 35 | - Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no 36 | - Ran FindSecurityBugs plugin and verified report? yes/no 37 | - Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no 38 | 39 | ## Samples 40 | > Provide high-level details about the samples related to this feature 41 | 42 | ## Related PRs 43 | > List any other related PRs 44 | 45 | ## Migrations (if applicable) 46 | > Describe migration steps and platforms on which migration has been tested 47 | 48 | ## Test environment 49 | > List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested 50 | 51 | ## Learning 52 | > Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem. -------------------------------------------------------------------------------- /helm/micro-integrator/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | apiVersion: apps/v1 15 | kind: Deployment 16 | metadata: 17 | name: {{ include "micro-integrator.fullname" . }} 18 | labels: 19 | {{ include "micro-integrator.labels" . | indent 4 }} 20 | spec: 21 | replicas: {{ .Values.replicaCount }} 22 | minReadySeconds: {{ .Values.minReadySeconds }} 23 | strategy: 24 | rollingUpdate: 25 | maxSurge: {{ .Values.strategy.rollingUpdate.maxSurge }} 26 | maxUnavailable: {{ .Values.strategy.rollingUpdate.maxUnavailable }} 27 | type: RollingUpdate 28 | selector: 29 | matchLabels: 30 | app.kubernetes.io/name: {{ include "micro-integrator.name" . }} 31 | app.kubernetes.io/instance: {{ .Release.Name }} 32 | template: 33 | metadata: 34 | labels: 35 | app.kubernetes.io/name: {{ include "micro-integrator.name" . }} 36 | app.kubernetes.io/instance: {{ .Release.Name }} 37 | spec: 38 | securityContext: 39 | runAsUser: 802 40 | {{- if or (not (eq .Values.capp.urls "")) (not (eq .Values.deploymentTomlURL ""))}} 41 | initContainers: 42 | {{- if not (eq .Values.capp.urls "") }} 43 | - name: init-download-capps 44 | image: "{{ .Values.images.initContainer.image }}:{{ .Values.images.initContainer.imageTag }}" 45 | command: 46 | - /bin/sh 47 | - "-c" 48 | - | 49 | set -e 50 | wget -P /capps {{ .Values.capp.urls }} 51 | volumeMounts: 52 | - name: capp-download 53 | mountPath: /capps 54 | {{- end }} 55 | {{- if not (eq .Values.deploymentTomlURL "") }} 56 | - name: init-download-deployment-toml 57 | image: "{{ .Values.images.initContainer.image }}:{{ .Values.images.initContainer.imageTag }}" 58 | command: 59 | - /bin/sh 60 | - "-c" 61 | - | 62 | set -e 63 | wget -P /conf {{ .Values.deploymentTomlURL }} 64 | volumeMounts: 65 | - name: deployment-toml-download 66 | mountPath: /conf 67 | {{- end }} 68 | {{- end }} 69 | {{- with .Values.imagePullSecrets }} 70 | imagePullSecrets: 71 | {{- toYaml . | nindent 8 }} 72 | {{- end }} 73 | containers: 74 | - name: {{ .Chart.Name }} 75 | image: "{{ .Values.images.microIntegrator.image }}:{{ .Values.images.microIntegrator.imageTag }}" 76 | imagePullPolicy: {{ .Values.images.microIntegrator.pullPolicy }} 77 | {{- if not (eq .Values.deploymentTomlURL "") }} 78 | command: 79 | - /bin/sh 80 | - "-c" 81 | - | 82 | set -e 83 | cp /home/wso2carbon/conf/deployment.toml /home/wso2carbon/wso2mi/conf/ 84 | /home/wso2carbon/wso2mi/bin/micro-integrator.sh 85 | {{- end}} 86 | ports: 87 | - name: http 88 | containerPort: {{ .Values.service.port }} 89 | protocol: TCP 90 | livenessProbe: 91 | exec: 92 | command: 93 | - /bin/sh 94 | - -c 95 | - nc -z localhost {{ .Values.service.port }} 96 | initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} 97 | periodSeconds: {{ .Values.livenessProbe.periodSeconds }} 98 | readinessProbe: 99 | exec: 100 | command: 101 | - /bin/sh 102 | - -c 103 | - nc -z localhost {{ .Values.service.port }} 104 | initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} 105 | periodSeconds: {{ .Values.readinessProbe.periodSeconds }} 106 | resources: 107 | {{- toYaml .Values.resources | nindent 12 }} 108 | {{- if or (not (eq .Values.capp.urls "")) (not (eq .Values.deploymentTomlURL ""))}} 109 | volumeMounts: 110 | {{- if not (eq .Values.capp.urls "") }} 111 | - name: capp-download 112 | mountPath: /home/wso2carbon/wso2mi/repository/deployment/server/carbonapps 113 | {{- end }} 114 | {{- if not (eq .Values.deploymentTomlURL "") }} 115 | - name: deployment-toml-download 116 | mountPath: /home/wso2carbon/conf 117 | {{- end }} 118 | volumes: 119 | {{- if not (eq .Values.capp.urls "") }} 120 | - name: capp-download 121 | emptyDir: {} 122 | {{- end}} 123 | {{- if not (eq .Values.deploymentTomlURL "") }} 124 | - name: deployment-toml-download 125 | emptyDir: {} 126 | {{- end }} 127 | {{- end }} 128 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pks-micro-integrator 2 | 3 | This repository contains Micro Integrator Pivotal PKS artifact resources. 4 | 5 | # Prerequisites 6 | 7 | * An already setup [Pivotal Application service(PAS) (v2.7.1)](https://network.pivotal.io/products/elastic-runtime#/releases/477769) 8 | * An already setup [Pivotal Container Service(PKS) (v1.5.1)](https://network.pivotal.io/products/pivotal-container-service#/releases/481414) 9 | * Install [NGINX Ingress Controller](https://kubernetes.github.io/ingress-nginx/deploy/) version [nginx-0.22.0](https://github.com/kubernetes/ingress-nginx/releases/tag/nginx-0.22.0) on the PKS provisioned Kubernetes cluster 10 | * An already setup [Pivotal Container Service Manager(KSM) (v0.5.1)](https://network.pivotal.io/products/container-services-manager#/releases/493270) 11 | * An already setup [VMware Harbor Registry (v1.8.3)](https://network.pivotal.io/products/harbor-container-registry#/releases/470132) 12 | 13 | >In the context of this document, 14 | 15 | > **PKS_MICRO_INTEGRATOR_HOME** will refer to a local copy of the wso2/pks-micro-integrator Git repository. 16 | 17 | # Build the PKS compatible Micro Integrator Helm chart 18 | 19 | 1. Clone PKS Resources for WSO2 Micro Integrator Git repository. 20 | 21 | `https://github.com/wso2/pks-micro-integrator.git` 22 | 23 | 1. Goto PKS_MICRO_INTEGRATOR_HOME/helm/micro-integrator directory. 24 | 25 | `cd PKS_MICRO_INTEGRATOR_HOME/helm/micro-integrator` 26 | 27 | 1. Build the Micro Integrator Helm chart with the following command 28 | 29 | ```helm package .``` 30 | 31 | # Configuring Micro Integrator on PKS 32 | 33 | 1. Push docker images to the private registry 34 | ``` 35 | docker pull wso2/micro-integrator:1.1.0 36 | docker tag wso2/micro-integrator:1.1.0 PRIVATE_DOCKER_REGISTRY_DOMAIN/PROJECT/micro-integrator:1.1.0 37 | docker push PRIVATE_DOCKER_REGISTRY_DOMAIN/PROJECT/micro-integrator:1.1.0 38 | 39 | docker pull busybox:1.31 40 | docker tag busybox:1.31 PRIVATE_DOCKER_REGISTRY_DOMAIN/PROJECT/busybox:1.31 41 | docker push PRIVATE_DOCKER_REGISTRY_DOMAIN/PROJECT/busybox:1.31 42 | ``` 43 | Where: 44 | * **PRIVATE_DOCKER_REGISTRY_DOMAIN** refers to the docker registry domain used by PKS. 45 | * **PROJECT** refers to the Harbor private docker registry project that is configured for the Pivotal KSM(Container Services Manager for Pivotal Platform -> Settings -> Container Registry Configuration -> Registry Server URL). 46 | 47 | 1. 48 | 1. Setup Micro Integrator Service on Pivotal KSM 49 | 1. Install the [KSM CLI](https://network.pivotal.io/products/container-services-manager#/releases/493270/file_groups/2225) 50 | 1. Configure KSM CLI using the [Pivotal KSM documentation](https://docs.pivotal.io/ksm/0-5/using.html) 51 | 1. Enable Service Offering Access 52 | 1. Log in to your PAS deployment by running the following command: 53 | 54 | `cf login -a API-URL -u USERNAME -p PASSWORD` 55 | 56 | Where: 57 | * **API-URL** is the API endpoint for your PAS instance. 58 | * **USERNAME** is your username for your PAS instance. 59 | * **PASSWORD** is your password for your PAS instance. 60 | 61 | 1. Enable access to the Micro Integrator service for all organizations by running the following command: 62 | 63 | `cf enable-service-access micro-integrator` 64 | 1. View the newly created Micro Integrator service plans by running the following command: 65 | 66 | `cf marketplace` 67 | 68 | Please find more information on using KSM [here](https://docs.pivotal.io/ksm/0-5/using.html). 69 | 70 | # Micro Integrator service plans 71 | 72 | Micro Integrator service comes with two plans which represent the resources allocated for a Micro integrator service instance: 73 | * Small [CPU = 1000m, Memory = 1Gi] 74 | * Medium [CPU = 2000m, Memory = 2Gi] 75 | 76 | # Deploy Micro Integrator service instance 77 | 78 | ### Burning Carbon Application(CApp) into Micro Integrator base image 79 | 80 | In this approach, the CApp is burnt into the Micro integrator docker image .Thereafter the image is referenced when deploying the Micro integrator service instance 81 | 82 | 1. Creating the Micro Integrator Docker image 83 | 1. Create a file named Dockerfile with the following content 84 | ``` 85 | FROM wso2/micro-integrator:1.1.0 86 | ARG CAPP_LOCATION 87 | COPY ${CAPP_LOCATION} /home/wso2carbon/wso2mi/repository/deployment/server/carbonapps 88 | ``` 89 | 90 | 1. Copy the CApp to the same directory where the Dockerfile is located. 91 | 1. Build the Docker image with the following command: 92 | 93 | `docker build -t PRIVATE_DOCKER_REGISTRY_DOMAIN/PROJECT/IMAGE_NAME:1.1.0 --build-arg CAPP_LOCATION=./CAPP_FILE .` 94 | 95 | Where: 96 | * **PRIVATE_DOCKER_REGISTRY_DOMAIN** refers to the docker registry domain used by PKS. 97 | * **PROJECT** refers to the Harbor private docker registry project that is configured for the Pivotal KSM(Container Services Manager for Pivotal Platform -> Settings -> Container Registry Configuration -> Registry Server URL). 98 | * **IMAGE_NAME** is the name of the docker image. 99 | * **CAPP_FILE** is the CApp file name(Ex: HelloWorld.car). 100 | 101 | 1. Push the docker image to the private registry with the following command: 102 | 103 | `docker push PRIVATE_DOCKER_REGISTRY_DOMAIN/PROJECT/IMAGE_NAME:1.1.0 ` 104 | 105 | 1. Create a file(params.json) which contains parameters for Micro integrator service instance 106 | ``` 107 | { 108 | "images": { 109 | "microIntegrator": { 110 | "image": "PRIVATE_DOCKER_REGISTRY_DOMAIN/PROJECT/IMAGE_NAME" 111 | } 112 | }, 113 | "ingress": { 114 | "host": "HOST_NAME" 115 | } 116 | } 117 | ``` 118 | Where: 119 | * **PRIVATE_DOCKER_REGISTRY_DOMAIN** refers to the docker registry domain used by PKS. 120 | * **PROJECT** refers to the Harbor private docker registry project that is configured for the Pivotal KSM(Container Services Manager for Pivotal Platform -> Settings -> Container Registry Configuration -> Registry Server URL). 121 | * **IMAGE_NAME** is the name of the docker image. 122 | * **HOST_NAME** is the Ingress hostname for Micro integrator service instance. 123 | 124 | 1. Create Micro Integrator Service Instance by running the following command: 125 | ``` 126 | cf create-service micro-integrator PLAN SERVICE_INSTANCE_NAME -c params.json 127 | ``` 128 | Where: 129 | 130 | * **PLAN** is the Micro integrator service plan(small or medium). 131 | * **SERVICE_INSTANCE_NAME** is the service instance name. 132 | * **params.json** is a file that contains parameters for the Micro integrator service instance. 133 | 134 | 1. Create a service key for the Micro-integrator by running the following command: 135 | 136 | `cf create-service-key SERVICE_INSTANCE_NAME KEY_NAME` 137 | 138 | Where: 139 | * **SERVICE_INSTANCE_NAME** is the service instance name. 140 | * **KEY_NAME** is the service key name. 141 | 142 | 1. Get the service key content with the following command: 143 | 144 | `cf service-key SERVICE_INSTANCE_NAME KEY_NAME` 145 | 146 | Where: 147 | * **SERVICE_INSTANCE_NAME** is the service instance name. 148 | * **KEY_NAME** is the service key name. 149 | 150 | Example output: 151 | ``` 152 | { 153 | "hostname": "HOSTNAME", 154 | "namespace": "NAMESPACE", 155 | "releaseName": "RELEASE_NAME" 156 | } 157 | ``` 158 | 159 | 1. Configure a hostname mapping to point **HOSTNAME** to Ingress controller Loadbalancer. 160 | 161 | 1. Invoke the Micro Integrator service instance as shown below 162 | 163 | `curl https://HOSTNAME/servies/SERVICE` 164 | 165 | ### Hosting CApp in a remote location 166 | 167 | In this method, the CApp is hosted in a remote location and the location is passed as a parameter when deploying the Micro integrator service instance. 168 | 169 | 1. Create a file(params.json) which contains parameters for Micro integrator service instance 170 | ``` 171 | { 172 | "capp": { 173 | "urls": "CAPP_FILE_LOCATION" 174 | }, 175 | "ingress": { 176 | "host": "HOST_NAME" 177 | } 178 | } 179 | ``` 180 | Where: 181 | * **CAPP_FILE_LOCATION** is the CApp file remote location(Ex: https://download.com/helloworld.capp). 182 | * **HOST_NAME** is the Ingress hostname for Micro integrator service instance. 183 | 184 | 1. Create Micro Integrator Service Instance by running the following command: 185 | ``` 186 | cf create-service micro-integrator PLAN SERVICE_INSTANCE_NAME -c params.json 187 | ``` 188 | Where: 189 | 190 | * **PLAN** is the Micro integrator service plan(small or medium). 191 | * **SERVICE_INSTANCE_NAME** is the service instance name. 192 | * **params.json** is a file that contains parameters for the Micro integrator service instance. 193 | 194 | 1. Create a service key for the Micro-integrator by running the following command: 195 | 196 | `cf create-service-key SERVICE_INSTANCE_NAME KEY_NAME` 197 | 198 | Where: 199 | * **SERVICE_INSTANCE_NAME** is the service instance name. 200 | * **KEY_NAME** is the service key name. 201 | 202 | 1. Get the service key content with the following command: 203 | 204 | `cf service-key SERVICE_INSTANCE_NAME KEY_NAME` 205 | 206 | Where: 207 | * **SERVICE_INSTANCE_NAME** is the service instance name. 208 | * **KEY_NAME** is the service key name. 209 | 210 | Example output: 211 | ```aidl 212 | { 213 | "hostname": "HOSTNAME", 214 | "namespace": "NAMESPACE", 215 | "releaseName": "RELEASE_NAME" 216 | } 217 | ``` 218 | 219 | 1. Configure a hostname mapping to point **HOSTNAME** to Ingress controller Loadbalancer. 220 | 221 | 1. Invoke the Micro Integrator service instance as shown below 222 | 223 | `curl https://HOSTNAME/servies/SERVICE` 224 | 225 | # Override Micro Integrator default configurations 226 | 227 | The configuration file of the Micro Integrator is located at MICRO_INTEGRATOR_HOME/conf/deployment.tom.l In the above 228 | location MICRO_INTEGRATOR_HOME refers to unzipped Micro Integrator distribution. There are two ways to provide this 229 | configuration file to a Micro integrator service instance. 230 | 231 | 232 | ### Burning configuration file into Micro Integrator base image 233 | 234 | In accordance with this approach, the deployment.toml file is burnt into the Micro integrator docker image itself. 235 | The image is referenced when deploying the Micro integrator service instance. 236 | 237 | 238 | 1. Creating the Micro Integrator Docker image 239 | 1. Create a file named Dockerfile with the following content 240 | ``` 241 | FROM wso2/micro-integrator:1.1.0 242 | ARG CONFIG_LOCATION 243 | COPY ${CONFIG_LOCATION} /home/wso2carbon/wso2mi/conf/ 244 | ``` 245 | This step can be combined with the Burning CApp into Micro Integrator base Docker image step. 246 | 1. Copy the deployment.toml to the same directory where the Dockerfile is located. 247 | 1. Build the Docker image with the following command: 248 | 249 | `docker build -t PRIVATE_DOCKER_REGISTRY_DOMAIN/PROJECT/IMAGE_NAME:1.1.0 --build-arg CONFIG_LOCATION=./deployment.toml .` 250 | 251 | Where: 252 | * **PRIVATE_DOCKER_REGISTRY_DOMAIN** refers to the docker registry domain used by PKS. 253 | * **PROJECT** refers to the Harbor private docker registry project that is configured for the Pivotal KSM(Container Services Manager for Pivotal Platform -> Settings -> Container Registry Configuration -> Registry Server URL). 254 | * **IMAGE_NAME** is the name of the docker image. 255 | * **CONFIG_LOCATION** is the deployment.toml file path. 256 | 257 | 1. Push the docker image to the private registry with the following command: 258 | 259 | `docker push PRIVATE_DOCKER_REGISTRY_DOMAIN/PROJECT/IMAGE_NAME:1.1.0 ` 260 | 261 | 1. Create a file(params.json) which contains parameters for Micro integrator service instance 262 | ``` 263 | { 264 | "images": { 265 | "microIntegrator": { 266 | "image": "PRIVATE_DOCKER_REGISTRY_DOMAIN/PROJECT/IMAGE_NAME" 267 | } 268 | }, 269 | "ingress": { 270 | "host": "HOST_NAME" 271 | } 272 | } 273 | ``` 274 | Where: 275 | * **PRIVATE_DOCKER_REGISTRY_DOMAIN** refers to the docker registry domain used by PKS. 276 | * **PROJECT** refers to the Harbor private docker registry project that is configured for the Pivotal KSM(Container Services Manager for Pivotal Platform -> Settings -> Container Registry Configuration -> Registry Server URL). 277 | * **IMAGE_NAME** is the name of the docker image. 278 | * **HOST_NAME** is the Ingress hostname for Micro integrator service instance. 279 | 280 | 1. Create Micro Integrator Service Instance by running the following command: 281 | ``` 282 | cf create-service micro-integrator PLAN SERVICE_INSTANCE_NAME -c params.json 283 | ``` 284 | Where: 285 | 286 | * **PLAN** is the Micro integrator service plan(small or medium). 287 | * **SERVICE_INSTANCE_NAME** is the service instance name. 288 | * **params.json** is a file that contains parameters for the Micro integrator service instance. 289 | 290 | 1. Create a service key for the Micro-integrator by running the following command: 291 | 292 | `cf create-service-key SERVICE_INSTANCE_NAME KEY_NAME` 293 | 294 | Where: 295 | * **SERVICE_INSTANCE_NAME** is the service instance name. 296 | * **KEY_NAME** is the service key name. 297 | 298 | 1. Get the service key content with the following command: 299 | 300 | `cf service-key SERVICE_INSTANCE_NAME KEY_NAME` 301 | 302 | Where: 303 | * **SERVICE_INSTANCE_NAME** is the service instance name. 304 | * **KEY_NAME** is the service key name. 305 | 306 | Example output: 307 | ``` 308 | { 309 | "hostname": "HOSTNAME", 310 | "namespace": "NAMESPACE", 311 | "releaseName": "RELEASE_NAME" 312 | } 313 | ``` 314 | 315 | 1. Configure a hostname mapping to point **HOSTNAME** to Ingress controller Loadbalancer. 316 | 317 | 1. Invoke the Micro Integrator service instance as shown below 318 | 319 | `curl https://HOSTNAME/servies/SERVICE` 320 | 321 | ### Hosting the Configuration file in a remote location 322 | 323 | In this approach, the deployment.toml is hosted in a remote location and the location is passed as a parameter when deploying the Micro integrator service instance. 324 | 325 | 1. Create a file(params.json) which contains parameters for Micro integrator service instance 326 | ``` 327 | { 328 | "ingress": { 329 | "host": "HOST_NAME" 330 | }, 331 | "deploymentTomlURL": "CONFIG_FILE_REMOTE_LOCATION" 332 | } 333 | ``` 334 | Where: 335 | * **HOST_NAME** is the Ingress hostname for Micro integrator service instance. 336 | * **CONFIG_FILE_REMOTE_LOCATION**openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key -out cert -subj "/CN=*.maanadev.com/O=wso2"openssl x509 -in cert -text -noout is the deployment.toml file remote location(Ex: https://download.com/deplyment.toml). 337 | 338 | 1. Create Micro Integrator Service Instance by running the following command: 339 | ``` 340 | cf create-service micro-integrator PLAN SERVICE_INSTANCE_NAME -c params.json 341 | ``` 342 | Where: 343 | 344 | * **PLAN** is the Micro integrator service plan(small or medium). 345 | * **SERVICE_INSTANCE_NAME** is the service instance name. 346 | * **params.json** is a file that contains parameters for the Micro integrator service instance. 347 | 348 | 1. Create a service key for the Micro-integrator by running the following command: 349 | 350 | `cf create-service-key SERVICE_INSTANCE_NAME KEY_NAME` 351 | 352 | Where: 353 | * **SERVICE_INSTANCE_NAME** is the service instance name. 354 | * **KEY_NAME** is the service key name. 355 | 356 | 1. Get the service key content with the following command: 357 | 358 | `cf service-key SERVICE_INSTANCE_NAME KEY_NAME` 359 | 360 | Where: 361 | * **SERVICE_INSTANCE_NAME** is the service instance name. 362 | * **KEY_NAME** is the service key name. 363 | 364 | Example output: 365 | ``` 366 | { 367 | "hostname": "HOSTNAME", 368 | "namespace": "NAMESPACE", 369 | "releaseName": "RELEASE_NAME" 370 | } 371 | ``` 372 | 373 | 1. Configure a hostname mapping to point **HOSTNAME** to Ingress controller Loadbalancer. 374 | 375 | 1. Invoke the Micro Integrator service instance as shown below 376 | 377 | `curl https://HOSTNAME/servies/SERVICE` 378 | --------------------------------------------------------------------------------