Skip to content

Commit

Permalink
Merge pull request #15 from lalithkota/develop
Browse files Browse the repository at this point in the history
Modified Minio install. Added external LB gateway, etc. Added ServiceProvider Ingress. Updated develop package. Removed Push Trigger.
  • Loading branch information
lalithkota authored Jul 20, 2023
2 parents 2f4bfc1 + 783b4cb commit 4f7cdb4
Show file tree
Hide file tree
Showing 11 changed files with 192 additions and 11 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/package_docker.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
name: OpenG2P Odoo Package Dockers build

on:
push: {}
workflow_dispatch: {}
workflow_dispatch:
inputs:
packageName:
description: 'Package Name'
required: true
default: '15.0-develop'
type: choice
options:
- "*"
- 15.0-develop
- 15.0-develop-pilot001
- 15.0-ugc-demo

jobs:
docker-build:
Expand All @@ -23,7 +33,14 @@ jobs:
cd packaging
for package in packages/*.txt; do
packageNameInput=${{ inputs.packageName }}
if [ ! -f "packages/${packageNameInput}.txt" ]; then
echo "Could not find the package specified." 1>&2;
exit 1;
fi
for package in packages/${packageNameInput}.txt; do
export VERSION=$(basename "${package}" ".txt")
if [[ $VERSION == 15.0-* ]]; then
export OCA_DEPENDENCY_VERSION="15.0"
Expand Down
12 changes: 12 additions & 0 deletions charts/openg2p/templates/selfservice-virtualservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ spec:
- {{ .Values.selfServiceIngress.istio.virtualservice.gateway }}
http:
- match:
- uri:
exact: /
- uri:
exact: /my
- uri:
Expand All @@ -29,6 +31,16 @@ spec:
exact: /web/database/selector
redirect:
uri: /selfservice
- match:
- uri:
prefix: /serviceprovider
redirect:
authority:
{{- if .Values.serviceProviderIngress.istio.virtualservice.host }}
{{ .Values.serviceProviderIngress.istio.virtualservice.host }}
{{- else }}
{{ .Values.global.serviceProviderHostname }}
{{- end }}
- route:
- destination:
host: {{ include "openg2p.fullname" . }}-odoo
Expand Down
50 changes: 50 additions & 0 deletions charts/openg2p/templates/serviceprovider-virtualservice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{{- if .Values.serviceProviderIngress.enabled }}
{{- if eq .Values.serviceProviderIngress.type "istio" }}
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: {{ include "openg2p.fullname" . }}-service-provider
labels:
{{- include "openg2p.labels" . | nindent 4 }}
spec:
hosts:
{{- if .Values.serviceProviderIngress.istio.virtualservice.host }}
- {{ .Values.serviceProviderIngress.istio.virtualservice.host }}
{{- else }}
- {{ .Values.global.serviceProviderHostname }}
{{- end }}
gateways:
- {{ .Values.serviceProviderIngress.istio.virtualservice.gateway }}
http:
- match:
- uri:
exact: /
- uri:
exact: /my
- uri:
prefix: /my/
- uri:
exact: /web
- uri:
exact: /web/login
- uri:
exact: /web/database/selector
redirect:
uri: /serviceprovider
- match:
- uri:
prefix: /selfservice
redirect:
authority:
{{- if .Values.selfServiceIngress.istio.virtualservice.host }}
{{ .Values.selfServiceIngress.istio.virtualservice.host }}
{{- else }}
{{ .Values.global.selfServiceHostname }}
{{- end }}
- route:
- destination:
host: {{ include "openg2p.fullname" . }}-odoo
port:
number: {{ .Values.odoo.service.port }}
{{- end }}
{{- end }}
27 changes: 27 additions & 0 deletions charts/openg2p/templates/virtualservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,33 @@ spec:
- {{ .Values.istio.virtualservice.gateway }}
{{- end }}
http:
- match:
- uri:
exact: /
redirect:
uri: /web
- match:
- uri:
prefix: /selfservice
redirect:
uri: /selfservice
authority:
{{- if .Values.selfServiceIngress.istio.virtualservice.host }}
{{ .Values.selfServiceIngress.istio.virtualservice.host }}
{{- else }}
{{ .Values.global.selfServiceHostname }}
{{- end }}
- match:
- uri:
prefix: /serviceprovider
redirect:
uri: /serviceprovider
authority:
{{- if .Values.serviceProviderIngress.istio.virtualservice.host }}
{{ .Values.serviceProviderIngress.istio.virtualservice.host }}
{{- else }}
{{ .Values.global.serviceProviderHostname }}
{{- end }}
- route:
- destination:
host: {{ include "openg2p.fullname" . }}-odoo
Expand Down
12 changes: 12 additions & 0 deletions charts/openg2p/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
global:
hostname: "openg2p.sandbox.net"
selfServiceHostname: "selfservice.openg2p.sandbox.net"
serviceProviderHostname: "serviceprovider.openg2p.sandbox.net"
mailname: "openg2p.sandbox.net"

odoo:
Expand Down Expand Up @@ -85,3 +86,14 @@ selfServiceIngress:
enabled: true
host: ""
gateway: "istio-system/all-hosts"

serviceProviderIngress:
enabled: true
type: istio
# TODO: Implement type: ingress
istio:
enabled: true
virtualservice:
enabled: true
host: ""
gateway: "istio-system/all-hosts"
15 changes: 15 additions & 0 deletions infra/istio-gateway-no-tls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: all-hosts
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*'
port:
name: http
number: 80
protocol: HTTP
49 changes: 49 additions & 0 deletions infra/istio-operator-external-lb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: istio-system
name: primary
spec:
profile: default
meshConfig:
accessLogFile: /dev/stdout
enableTracing: true
pathNormalization:
normalization: MERGE_SLASHES
defaultConfig:
proxyMetadata:
ISTIO_META_IDLE_TIMEOUT: 0s
holdApplicationUntilProxyStarts: true
components:
ingressGateways:
- name: istio-ingressgateway
enabled: true
k8s:
hpaSpec:
minReplicas: 3
nodeSelector:
shouldInstallIstioIngress: "true"
service:
type: NodePort
ports:
- port: 15021
name: status-port
targetPort: 15021
nodePort: 30521
protocol: TCP
- port: 80
targetPort: 8080
nodePort: 30080
name: http2
- port: 5432
targetPort: 5432
nodePort: 32432
name: tcp-postgres01
- port: 5433
targetPort: 5433
nodePort: 32433
name: tcp-postgres02
- port: 5434
targetPort: 5434
nodePort: 32434
name: tcp-postgres03
6 changes: 0 additions & 6 deletions infra/keycloak-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,8 @@ ingress:
- ""
secretName: tls-keycloak-ingress

proxyAddressForwarding: true

replicaCount: 2

# Enable if replicaCount > 1
serviceDiscovery:
enabled: true

resources:
limits: {}
requests:
Expand Down
4 changes: 3 additions & 1 deletion infra/minio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
- Run the following commands from the current directory to install minio, on openg2p cluster.
```sh
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
kubectl create ns minio
helm -n minio install minio bitnami/minio -f values-minio.yaml
```
```
- Navigate to OpenG2P Documents (From OpenG2P Menu), then to Document Store. Configure URL and password for this backend service. Pasword and account-id/username can be obtained from the secrets in minio namespace.
2 changes: 1 addition & 1 deletion infra/minio/values-minio.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
persistence:
enabled: true
size: 8Gi
size: 16Gi
3 changes: 3 additions & 0 deletions packaging/packages/15.0-develop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ server_auth = git://15.0//http://github.com/openg2p/server-auth
queue = git://15.0//http://github.com/oca/queue
connector = git://15.0//http://github.com/oca/connector
rest_framework = git://15.0//http://github.com/oca/rest-framework
server_env = git://15.0//http://github.com/oca/server-env
storage = git://15.0//http://github.com/oca/storage
#
odoo_json_field = git://15.0-develop//https://github.com/openg2p/odoo-json-field
openg2p_documents = git://15.0-develop//https://github.com/openg2p/openg2p-documents
openg2p_registry = git://15.0-develop//https://github.com/openg2p/openg2p-registry
openg2p_program = git://15.0-develop//https://github.com/openg2p/openg2p-program
openg2p_mts = git://15.0-develop//https://github.com/openg2p/openg2p-mts
Expand Down

0 comments on commit 4f7cdb4

Please sign in to comment.