Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
knowledge-platform
Commits
8f305a1e
Commit
8f305a1e
authored
2 years ago
by
Kartheek Palla
Browse files
Options
Download
Patches
Plain Diff
Issue #KN-767 fix: dial services helm charts added
parent
2d3a6a1a
patch-3
knowlg-oneclick
patch-1
patch-2
No related merge requests found
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
knowlg-automation/helm_charts/dial/Chart.yaml
+5
-0
knowlg-automation/helm_charts/dial/Chart.yaml
knowlg-automation/helm_charts/dial/dial-service_application.conf
+189
-0
...automation/helm_charts/dial/dial-service_application.conf
knowlg-automation/helm_charts/dial/dial-service_logback.xml
+28
-0
knowlg-automation/helm_charts/dial/dial-service_logback.xml
knowlg-automation/helm_charts/dial/templates/deployment.yaml
+75
-0
knowlg-automation/helm_charts/dial/templates/deployment.yaml
knowlg-automation/helm_charts/dial/templates/dial-configmap
+234
-0
knowlg-automation/helm_charts/dial/templates/dial-configmap
knowlg-automation/helm_charts/dial/values.yaml
+34
-0
knowlg-automation/helm_charts/dial/values.yaml
knowlg-automation/terraform/azure/dial-provision.tf
+10
-0
knowlg-automation/terraform/azure/dial-provision.tf
knowlg-automation/terraform/azure/variables.tf
+13
-1
knowlg-automation/terraform/azure/variables.tf
knowlg-automation/terraform/local/dial-provision.tf
+10
-0
knowlg-automation/terraform/local/dial-provision.tf
knowlg-automation/terraform/local/kafka-provision.tf
+1
-1
knowlg-automation/terraform/local/kafka-provision.tf
knowlg-automation/terraform/local/vars.tf
+11
-0
knowlg-automation/terraform/local/vars.tf
with
610 additions
and
2 deletions
+610
-2
knowlg-automation/helm_charts/dial/Chart.yaml
0 → 100644
+
5
−
0
View file @
8f305a1e
apiVersion
:
v1
appVersion
:
"
1.0"
description
:
A Helm chart for Kubernetes
name
:
dial
version
:
0.1.0
\ No newline at end of file
This diff is collapsed.
Click to expand it.
knowlg-automation/helm_charts/dial/dial-service_application.conf
0 → 100644
+
189
−
0
View file @
8f305a1e
# This is the main configuration file for the application.
# https://www.playframework.com/documentation/latest/ConfigFile
# ~~~~~
## Akka
# https://www.playframework.com/documentation/latest/JavaAkka#Configuration
# ~~~~~
akka
{
#loggers =["akka.event.Logging$DefaultLogger"]
#log-config-on-start = true
}
## Secret key
# http://www.playframework.com/documentation/latest/ApplicationSecret
# ~~~~~
#play.crypto.secret = "changeme"
## Internationalisation
# https://www.playframework.com/documentation/latest/JavaI18N
# ~~~~~
play
.
i18n
{
# The application languages
langs
= [
"en"
]
}
## Play HTTP settings
# ~~~~~
play
.
http
{
## Router
# https://www.playframework.com/documentation/latest/JavaRouting
# https://www.playframework.com/documentation/latest/ScalaRouting
# ~~~~~
# Define the Router object to use for this application.
# This router will be looked up first when the application is starting up,
# so make sure this is the entry point.
# Furthermore, it's assumed your route file is named properly.
# So for an application router like `my.application.Router`,
# you may need to define a router file `conf/my.application.routes`.
# Default to Routes in the root package (aka "apps" folder) (and conf/routes)
#router = my.application.Router
#TO allow more data in request body
parser
.
maxDiskBuffer
=
50
MB
parser
.
maxMemoryBuffer
=
50
MB
}
## Netty Provider
# ~~~~~
play
.
server
.
netty
{
# If you run Play on Linux, you can use Netty's native socket transport
# for higher performance with less garbage.
#transport = "native"
maxChunkSize
=
30000000
}
## WS (HTTP Client)
# ~~~~~
libraryDependencies
+=
javaWs
## Cache
# https://www.playframework.com/documentation/latest/JavaCache
# https://www.playframework.com/documentation/latest/ScalaCache
# ~~~~~
# Play comes with an integrated cache API that can reduce the operational
# overhead of repeated requests. You must enable this by adding to build.sbt:
#
libraryDependencies
+=
cache
#
play
.
cache
{
# If you want to bind several caches, you can bind the individually
#bindCaches = ["db-cache", "user-cache", "session-cache"]
}
//
play
.
http
.
filters
=
filters
.
HealthCheckFilter
# Logger
# ~~~~~
# You can also configure logback (http://logback.qos.ch/),
# by providing an application-logger.xml file in the conf directory.
# Root logger:
#logger.root=ERROR
# Logger used by the framework:
#logger.play=INFO
# Logger provided to your application:
#logger.application=DEBUG
# APP Specific config
# ~~~~~
# Application specific configurations can be provided here
application
.
global
=
Global
play
.
http
.
parser
.
maxMemoryBuffer
=
900000
K
play
.
http
.
parser
.
maxDiskBuffer
=
900000
K
play
.
server
.
http
.
port
=
9000
# Logger
# ~~~~~
# You can also configure logback (http://logback.qos.ch/),
# by providing an application-logger.xml file in the conf directory.
# Root logger:
logger
.
root
=
ERROR
# Logger used by the framework:
logger
.
play
=
INFO
# Logger provided to your application:
logger
.
application
=
DEBUG
# APP Specific config
# ~~~~~
# Application specific configurations can be provided here
# Cache-Manager Configuration
cache
.
type
=
"redis"
search
.
es_conn_info
=
"{{ .Values.es_connection }}"
search
.
fields
.
query
=[
"name^100"
,
"title^100"
,
"lemma^100"
,
"code^100"
,
"tags^100"
,
"question^100"
,
"domain"
,
"subject"
,
"description^10"
,
"keywords^25"
,
"ageGroup^10"
,
"filter^10"
,
"theme^10"
,
"genre^10"
,
"objects^25"
,
"contentType^100"
,
"language^200"
,
"teachingMode^25"
,
"skills^10"
,
"learningObjective^10"
,
"curriculum^100"
,
"gradeLevel^100"
,
"developer^100"
,
"attributions^10"
,
"owner^50"
,
"text"
,
"words"
,
"releaseNotes"
,
"body"
]
search
.
fields
.
date
=[
"lastUpdatedOn"
,
"createdOn"
,
"versionDate"
,
"lastSubmittedOn"
,
"lastPublishedOn"
]
search
.
batch
.
size
=
500
search
.
connection
.
timeout
=
30
#Top N Config for Search Telemetry
telemetry
.
search
.
topn
=
5
telemetry_env
=
dev
installation
.
id
=
ekstep
# Configuration for default channel ID
channel
.
default
=
"in.ekstep"
# Redis Configuration
redis
.
host
=
"{{ .Values.redis_connection}}"
redis
.
port
=
6379
redis
.
maxConnections
=
128
# DIAL Code Configuration
dialcode
.
keyspace
.
name
=
"{{ .Values.dialcode_keyspace_name }}"
dialcode
.
keyspace
.
table
=
"{{ .Values.dialcode_keyspace_table }}"
dialcode
.
max_count
=
1000
# System Configuration
system
.
config
.
keyspace
.
name
=
"{{ .Values.system_config_keyspace_name}}"
system
.
config
.
table
=
"{{ .Values.system_config_table}}"
#Publisher Configuration
publisher
.
keyspace
.
name
=
"{{ .Values.system_config_table}}"
publisher
.
keyspace
.
table
=
"{{ .Values.publisher_keyspace_table}}"
#DIAL Code Generator Configuration
dialcode
.
strip
.
chars
=
"0"
dialcode
.
length
=
6
.
0
dialcode
.
large
.
prime_number
=
1679979167
#DIAL Code ElasticSearch Configuration
dialcode
.
index
=
true
dialcode
.
object_type
=
"{{ .Values.dialocode_object_type}}"
# Cassandra Configuration
cassandra
.
lp
.
connection
=
"{{ .Values.cassandra_connection }}"
cassandra
.
lpa
.
connection
=
"{{ .Values.cassandra_connection }}"
# Consistency Level for Multi Node Cassandra cluster
#cassandra.lp.consistency.level=QUORUM
#Kafka Configuration
kafka
{
urls
=
"{{ .Values.kafka_connection}}"
topic
{
send_enable
=
false
graph_event
=
"{{ .Values.graph_event}}"
}
}
jsonld
{
basePath
=
"https://sunbirdstagingpublic.blob.core.windows.net/sunbird-dial-staging/jsonld-schema/local"
type
=
"sbed"
localPath
=
"/tmp"
ttl
=
43200
sb_schema
= [
"http://store.knowlg.sunbird.org/dial/specs/sbed/schema.jsonld"
]
}
dial_id
=
"https://dev.sunbirded.org/dial/{dialcode}"
dial_type
=
"https://dev.sunbirded.org/ns/"
This diff is collapsed.
Click to expand it.
knowlg-automation/helm_charts/dial/dial-service_logback.xml
0 → 100644
+
28
−
0
View file @
8f305a1e
<configuration>
<conversionRule
conversionWord=
"coloredLevel"
converterClass=
"play.api.libs.logback.ColoredLevel"
/>
<!-- transaction-event-trigger START -->
<timestamp
key=
"timestamp"
datePattern=
"yyyy-MM-dd"
/>
<!-- common transactions logs -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
%d %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"ASYNCSTDOUT"
class=
"ch.qos.logback.classic.AsyncAppender"
>
<appender-ref
ref=
"STDOUT"
/>
</appender>
<logger
name=
"play"
level=
"INFO"
/>
<logger
name=
"DefaultPlatformLogger"
level=
"INFO"
/>
<!-- Telemetry Loggers-->
<logger
name=
"TelemetryEventLogger"
level=
"INFO"
/>
<root
level=
"INFO"
>
<appender-ref
ref=
"ASYNCSTDOUT"
/>
</root>
</configuration>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
knowlg-automation/helm_charts/dial/templates/deployment.yaml
0 → 100644
+
75
−
0
View file @
8f305a1e
---
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
{{
.Chart.Name
}}
namespace
:
{{
.Values.api_namespace
}}
annotations
:
reloader.stakater.com/auto
:
"
true"
spec
:
replicas
:
{{
.Values.replicaCount
}}
strategy
:
rollingUpdate
:
maxSurge
:
{{
.Values.strategy.maxsurge
}}
maxUnavailable
:
{{
.Values.strategy.maxunavailable
}}
selector
:
matchLabels
:
app
:
{{
.Chart.Name
}}
template
:
metadata
:
labels
:
app
:
{{
.Chart.Name
}}
spec
:
volumes
:
-
name
:
{{
.Chart.Name
}}
-config
configMap
:
name
:
{{
.Chart.Name
}}
-config
-
name
:
{{
.Chart.Name
}}
-xml-config
configMap
:
name
:
{{
.Chart.Name
}}
-xml-config
containers
:
-
name
:
{{
.Chart.Name
}}
image
:
"
{{
.Values.repository
}}:{{
.Values.image_tag
}}"
imagePullPolicy
:
Always
env
:
-
name
:
JAVA_OPTIONS
value
:
{{
.Values.env.javaoptions | quote
}}
-
name
:
_JAVA_OPTIONS
value
:
-Dlog4j2.formatMsgNoLookups=true
envFrom
:
-
configMapRef
:
name
:
{{
.Chart.Name
}}
-config
resources
:
{{
toYaml .Values.resources | indent 10
}}
ports
:
-
containerPort
:
{{
.Values.network.port
}}
{{
- if .Values.healthcheck
}}
livenessProbe
:
{{
toYaml .Values.livenessProbe | indent 10
}}
readinessProbe
:
{{
toYaml .Values.readinessProbe | indent 10
}}
{{
- end
}}
volumeMounts
:
-
name
:
{{
.Chart.Name
}}
-config
mountPath
:
/home/sunbird/sunbird-dial-service-1.0-SNAPSHOT/config/application.conf
subPath
:
dial-service_application.conf
-
name
:
{{
.Chart.Name
}}
-xml-config
mountPath
:
/home/sunbird/sunbird-dial-service-1.0-SNAPSHOT/config/logback.xml
subPath
:
dial-service_logback.xml
---
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
{{
.Chart.Name
}}
-service
namespace
:
{{
.Values.api_namespace
}}
labels
:
app
:
{{
.Chart.Name
}}
spec
:
type
:
{{
.Values.serviceType
}}
ports
:
-
name
:
http-{{ .Chart.Name }}
protocol
:
TCP
port
:
{{
.Values.network.targetport
}}
selector
:
app
:
{{
.Chart.Name
}}
This diff is collapsed.
Click to expand it.
knowlg-automation/helm_charts/dial/templates/dial-configmap
0 → 100644
+
234
−
0
View file @
8f305a1e
apiVersion: v1
kind: ConfigMap
metadata:
name: dial-xml-config
namespace: knowlg-api
data:
dial-service_logback.xml: |
<configuration>
<conversionRule conversionWord="coloredLevel" converterClass="play.api.libs.logback.ColoredLevel" />
<!-- transaction-event-trigger START -->
<timestamp key="timestamp" datePattern="yyyy-MM-dd"/>
<!-- common transactions logs -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d %msg%n</pattern>
</encoder>
</appender>
<appender name="ASYNCSTDOUT" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="STDOUT" />
</appender>
<logger name="play" level="INFO" />
<logger name="DefaultPlatformLogger" level="INFO" />
<!-- Telemetry Loggers-->
<logger name="TelemetryEventLogger" level="INFO" />
<root level="INFO">
<appender-ref ref="ASYNCSTDOUT" />
</root>
</configuration>
---
apiVersion: v1
kind: ConfigMap
metadata:
name: dial-config
namespace: knowlg-api
data:
dial-service_application.conf: |-
# This is the main configuration file for the application.
# https://www.playframework.com/documentation/latest/ConfigFile
# ~~~~~
## Akka
# https://www.playframework.com/documentation/latest/JavaAkka#Configuration
# ~~~~~
akka {
#loggers =["akka.event.Logging$DefaultLogger"]
#log-config-on-start = true
}
## Secret key
# http://www.playframework.com/documentation/latest/ApplicationSecret
# ~~~~~
#play.crypto.secret = "changeme"
## Internationalisation
# https://www.playframework.com/documentation/latest/JavaI18N
# ~~~~~
play.i18n {
# The application languages
langs = [ "en" ]
}
## Play HTTP settings
# ~~~~~
play.http {
## Router
# https://www.playframework.com/documentation/latest/JavaRouting
# https://www.playframework.com/documentation/latest/ScalaRouting
# ~~~~~
# Define the Router object to use for this application.
# This router will be looked up first when the application is starting up,
# so make sure this is the entry point.
# Furthermore, it's assumed your route file is named properly.
# So for an application router like `my.application.Router`,
# you may need to define a router file `conf/my.application.routes`.
# Default to Routes in the root package (aka "apps" folder) (and conf/routes)
#router = my.application.Router
#TO allow more data in request body
parser.maxDiskBuffer=50MB
parser.maxMemoryBuffer=50MB
}
## Netty Provider
# ~~~~~
play.server.netty {
# If you run Play on Linux, you can use Netty's native socket transport
# for higher performance with less garbage.
#transport = "native"
maxChunkSize = 30000000
}
## WS (HTTP Client)
# ~~~~~
libraryDependencies += javaWs
## Cache
# https://www.playframework.com/documentation/latest/JavaCache
# https://www.playframework.com/documentation/latest/ScalaCache
# ~~~~~
# Play comes with an integrated cache API that can reduce the operational
# overhead of repeated requests. You must enable this by adding to build.sbt:
#
libraryDependencies += cache
#
play.cache {
# If you want to bind several caches, you can bind the individually
#bindCaches = ["db-cache", "user-cache", "session-cache"]
}
//play.http.filters= filters.HealthCheckFilter
# Logger
# ~~~~~
# You can also configure logback (http://logback.qos.ch/),
# by providing an application-logger.xml file in the conf directory.
# Root logger:
#logger.root=ERROR
# Logger used by the framework:
#logger.play=INFO
# Logger provided to your application:
#logger.application=DEBUG
# APP Specific config
# ~~~~~
# Application specific configurations can be provided here
application.global=Global
play.http.parser.maxMemoryBuffer = 900000K
play.http.parser.maxDiskBuffer = 900000K
play.server.http.port = 9000
# Logger
# ~~~~~
# You can also configure logback (http://logback.qos.ch/),
# by providing an application-logger.xml file in the conf directory.
# Root logger:
logger.root=ERROR
# Logger used by the framework:
logger.play=INFO
# Logger provided to your application:
logger.application=DEBUG
# APP Specific config
# ~~~~~
# Application specific configurations can be provided here
# Cache-Manager Configuration
cache.type="redis"
search.es_conn_info="{{ .Values.es_connection }}"
search.fields.query=["name^100","title^100","lemma^100","code^100","tags^100","question^100","domain","subject","description^10","keywords^25","ageGroup^10","filter^10","theme^10","genre^10","objects^25","contentType^100","language^200","teachingMode^25","skills^10","learningObjective^10","curriculum^100","gradeLevel^100","developer^100","attributions^10","owner^50","text","words","releaseNotes","body"]
search.fields.date=["lastUpdatedOn","createdOn","versionDate","lastSubmittedOn","lastPublishedOn"]
search.batch.size=500
search.connection.timeout=30
#Top N Config for Search Telemetry
telemetry.search.topn=5
telemetry_env=dev
installation.id=ekstep
# Configuration for default channel ID
channel.default="in.ekstep"
# Redis Configuration
redis.host="{{ .Values.redis_connection}}"
redis.port=6379
redis.maxConnections=128
# DIAL Code Configuration
dialcode.keyspace.name="{{ .Values.dialcode_keyspace_name }}"
dialcode.keyspace.table="{{ .Values.dialcode_keyspace_table }}"
dialcode.max_count=1000
# System Configuration
system.config.keyspace.name="{{ .Values.system_config_keyspace_name}}"
system.config.table="{{ .Values.system_config_table}}"
#Publisher Configuration
publisher.keyspace.name="{{ .Values.system_config_table}}"
publisher.keyspace.table="{{ .Values.publisher_keyspace_table}}"
#DIAL Code Generator Configuration
dialcode.strip.chars="0"
dialcode.length=6.0
dialcode.large.prime_number=1679979167
#DIAL Code ElasticSearch Configuration
dialcode.index=true
dialcode.object_type="{{ .Values.dialocode_object_type}}"
# Cassandra Configuration
cassandra.lp.connection="{{ .Values.cassandra_connection }}"
cassandra.lpa.connection="{{ .Values.cassandra_connection }}"
# Consistency Level for Multi Node Cassandra cluster
#cassandra.lp.consistency.level=QUORUM
#Kafka Configuration
kafka {
urls = "{{ .Values.kafka_connection}}"
topic {
send_enable = false
graph_event = "{{ .Values.graph_event}}"
}
}
jsonld {
basePath = "https://sunbirdstagingpublic.blob.core.windows.net/sunbird-dial-staging/jsonld-schema/local"
type = "sbed"
localPath = "/tmp"
ttl = 43200
sb_schema = ["http://store.knowlg.sunbird.org/dial/specs/sbed/schema.jsonld"]
}
dial_id = "https://dev.sunbirded.org/dial/{dialcode}"
dial_type = "https://dev.sunbirded.org/ns/"
This diff is collapsed.
Click to expand it.
knowlg-automation/helm_charts/dial/values.yaml
0 → 100644
+
34
−
0
View file @
8f305a1e
api_namespace
:
knowlg-api
env
:
javaoptions
:
-Xmx600m
replicaCount
:
1
repository
:
docker.io/aimansharief/dial-service
image_tag
:
R5.2.0
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
limits
:
cpu
:
1
memory
:
1024Mi
network
:
port
:
9000
targetport
:
9000
strategy
:
type
:
RollingUpdate
maxsurge
:
25%
maxunavailable
:
25%
serviceType
:
ClusterIP
cassandra_connection
:
cassandra-db.knowlg-db.svc.cluster.local:9042
redis_connection
:
redis-db.knowlg-db.svc.cluster.local
es_connection
:
elasticsearch.knowlg-db.svc.cluster.local:9200
dialcode_keyspace_name
:
dialcode_store
dialcode_keyspace_table
:
dial_code
systemconfig_keyspace_name
:
dialcode_store
systemconfig_table
:
system_config
publisher_keyspace_name
:
dialcode_store
publisher_keyspace_table
:
publisher
dialcode_object_type
:
DialCode
graph_event
:
local.learning.graph.events
\ No newline at end of file
This diff is collapsed.
Click to expand it.
knowlg-automation/terraform/azure/dial-provision.tf
0 → 100644
+
10
−
0
View file @
8f305a1e
resource
"helm_release"
"dial"
{
name
=
"dial"
chart
=
var
.
DIAL_CHART
namespace
=
var
.
DIAL_NAMESPACE
create_namespace
=
true
dependency_update
=
true
depends_on
=
[
helm_release
.
learning
]
wait_for_jobs
=
true
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
knowlg-automation/terraform/azure/variables.tf
+
13
−
1
View file @
8f305a1e
...
...
@@ -186,4 +186,16 @@ variable "LEARNING_CHART" {
variable
"LEARNING_NAMESPACE"
{
description
=
"Learning Instance Running Namespace"
default
=
"knowlg-api"
}
\ No newline at end of file
}
#DIAL
variable
"DIAL_CHART"
{
description
=
"DIAL Instance Running Namespace"
default
=
"../../helm_charts/dial"
}
variable
"DIAL_NAMESPACE"
{
description
=
"DIAL Instance Running Namespace"
default
=
"knowlg-api"
}
This diff is collapsed.
Click to expand it.
knowlg-automation/terraform/local/dial-provision.tf
0 → 100644
+
10
−
0
View file @
8f305a1e
resource
"helm_release"
"dial"
{
name
=
"dial"
chart
=
var
.
DIAL_CHART
namespace
=
var
.
DIAL_NAMESPACE
create_namespace
=
true
dependency_update
=
true
depends_on
=
[
kind_cluster
.
one
-
click
]
wait_for_jobs
=
true
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
knowlg-automation/terraform/local/kafka-provision.tf
+
1
−
1
View file @
8f305a1e
...
...
@@ -32,7 +32,7 @@ resource "helm_release" "kafka" {
# zookeeper_enabled: true
# zookeeper_heapsize: 256
# zookeeper_replica_count: 1
content_publish_topic
_topic
=
"dev.publish.job.request"
content_publish_topic
=
"dev.publish.job.request"
content_postpublish_topic
=
"dev.content.postpublish.request"
learning_job_request_topic
=
"dev.learning_job_request"
learning_graph_events_topic
=
"dev.learning.graph.events"
...
...
This diff is collapsed.
Click to expand it.
knowlg-automation/terraform/local/vars.tf
+
11
−
0
View file @
8f305a1e
...
...
@@ -134,3 +134,14 @@ variable "LEARNING_NAMESPACE" {
default
=
"knowlg-api"
}
#DIAL
variable
"DIAL_CHART"
{
description
=
"DIAL Instance Running Namespace"
default
=
"../../helm_charts/dial"
}
variable
"DIAL_NAMESPACE"
{
description
=
"DIAL Instance Running Namespace"
default
=
"knowlg-api"
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets