UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ironbank Containers
C
Confluent
Confluent Component Operator
cp-init-container-operator-6.1.1
Commits
7ef0bc37
Commit
7ef0bc37
authored
Aug 11, 2021
by
alexander.klepal
Browse files
Merge branch 'yeti' into 'development'
script updates See merge request
!19
parents
255cb537
276389bd
Pipeline
#419125
passed with stages
in 19 minutes and 30 seconds
Changes
24
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
654 additions
and
0 deletions
+654
-0
scripts/config.py
scripts/config.py
+66
-0
scripts/confluentinc/connect/bin/configure
scripts/confluentinc/connect/bin/configure
+21
-0
scripts/confluentinc/connect/bin/launch
scripts/confluentinc/connect/bin/launch
+52
-0
scripts/confluentinc/connect/bin/run
scripts/confluentinc/connect/bin/run
+19
-0
scripts/confluentinc/controlcenter/bin/configure
scripts/confluentinc/controlcenter/bin/configure
+21
-0
scripts/confluentinc/controlcenter/bin/launch
scripts/confluentinc/controlcenter/bin/launch
+52
-0
scripts/confluentinc/controlcenter/bin/run
scripts/confluentinc/controlcenter/bin/run
+19
-0
scripts/confluentinc/kafka/bin/configure
scripts/confluentinc/kafka/bin/configure
+21
-0
scripts/confluentinc/kafka/bin/launch
scripts/confluentinc/kafka/bin/launch
+54
-0
scripts/confluentinc/kafka/bin/run
scripts/confluentinc/kafka/bin/run
+20
-0
scripts/confluentinc/ksqldb/bin/configure
scripts/confluentinc/ksqldb/bin/configure
+26
-0
scripts/confluentinc/ksqldb/bin/launch
scripts/confluentinc/ksqldb/bin/launch
+63
-0
scripts/confluentinc/ksqldb/bin/run
scripts/confluentinc/ksqldb/bin/run
+19
-0
scripts/confluentinc/replicator/bin/configure
scripts/confluentinc/replicator/bin/configure
+21
-0
scripts/confluentinc/replicator/bin/launch
scripts/confluentinc/replicator/bin/launch
+52
-0
scripts/confluentinc/replicator/bin/run
scripts/confluentinc/replicator/bin/run
+19
-0
scripts/confluentinc/schemaregistry/bin/configure
scripts/confluentinc/schemaregistry/bin/configure
+20
-0
scripts/confluentinc/schemaregistry/bin/launch
scripts/confluentinc/schemaregistry/bin/launch
+46
-0
scripts/confluentinc/schemaregistry/bin/run
scripts/confluentinc/schemaregistry/bin/run
+19
-0
scripts/confluentinc/zookeeper/bin/configure
scripts/confluentinc/zookeeper/bin/configure
+24
-0
No files found.
scripts/config.py
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env python
import
json
import
sys
import
os
import
_jsonnet
import
requests
# Rack awareness logic
node_labels
=
[]
rack_labels
=
[]
env_var
=
'RACK_NODE_LABELS'
token_path
=
'/var/run/secrets/kubernetes.io/serviceaccount/token'
if
env_var
in
os
.
environ
:
rack_labels
=
json
.
loads
(
os
.
environ
[
env_var
])
service_host
=
os
.
environ
[
'KUBERNETES_SERVICE_HOST'
]
tcp_port
=
os
.
environ
[
'KUBERNETES_PORT_443_TCP_PORT'
]
hostname
=
os
.
environ
[
'HOSTNAME'
]
namespace
=
os
.
environ
[
'POD_NAMESPACE'
]
with
open
(
token_path
)
as
f
:
kube_token
=
f
.
read
()
headers
=
{
'Authorization'
:
'Bearer %s'
%
kube_token
}
# get label value for rack awareness node label
api_url
=
'https://%s:%s/api/v1/'
%
(
service_host
,
tcp_port
)
r
=
requests
.
get
(
api_url
+
'namespaces/%s/pods/%s'
%
(
namespace
,
hostname
),
headers
=
headers
,
verify
=
False
)
if
r
.
status_code
!=
200
:
sys
.
exit
(
r
.
json
())
node_name
=
r
.
json
()[
'spec'
][
'nodeName'
]
r
=
requests
.
get
(
api_url
+
'nodes/%s'
%
node_name
,
headers
=
headers
,
verify
=
False
)
if
r
.
status_code
!=
200
:
sys
.
exit
(
r
.
json
())
node_labels
=
r
.
json
()[
'metadata'
][
'labels'
]
for
label
in
rack_labels
:
if
label
not
in
node_labels
:
sys
.
exit
(
'node label: %s not found in pod node metadata'
%
label
)
pod_name
=
sys
.
argv
[
1
]
data_file
=
sys
.
argv
[
2
]
jsonnet_file
=
sys
.
argv
[
3
]
output_file
=
sys
.
argv
[
4
]
with
open
(
data_file
)
as
df
:
data
=
json
.
load
(
df
)
with
open
(
jsonnet_file
,
"r"
)
as
jf
:
jsonnet_str
=
jf
.
read
()
json_str
=
_jsonnet
.
evaluate_snippet
(
"snippet"
,
jsonnet_str
,
ext_vars
=
{
'podName'
:
pod_name
,
'data'
:
json
.
dumps
(
data
),
'nodeLabels'
:
json
.
dumps
(
node_labels
),
'rackLabels'
:
json
.
dumps
(
rack_labels
)
},
)
json_obj
=
json
.
loads
(
json_str
)
with
open
(
output_file
,
'w'
)
as
of
:
json
.
dump
(
json_obj
,
of
)
scripts/confluentinc/connect/bin/configure
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
if
[
!
-d
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
]
;
then
mkdir
-p
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
fi
cat
"
${
CONNECT_CONFIG_DIR
}
/shared/
${
CP_COMPONENT_NAME
}
.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
CONNECT_CONFIG_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
CONNECT_CONFIG_DIR
}
/shared/log4j.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
CONNECT_CONFIG_DIR
}
/log4j.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
CONNECT_CONFIG_DIR
}
/shared/disk-usage-agent.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
cat
"
${
CONNECT_CONFIG_DIR
}
/shared/jvm.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
cat
"
${
CONNECT_CONFIG_DIR
}
/jvm.config"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
if
[
-e
"
${
CONNECT_CONFIG_DIR
}
/shared/jolokia.config"
]
;
then
cat
"
${
CONNECT_CONFIG_DIR
}
/shared/jolokia.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
fi
scripts/confluentinc/connect/bin/launch
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
errexit
echo
"===> Adding log4j config ... "
export
KAFKA_LOG4J_OPTS
=
"-Dlog4j.configuration=file:
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
##
## This condition is only required to work with older images
## TODO, this code needs to move removed as the metrics configurion
## is moved to the Operator code.
##
if
[
-d
/opt/confluent/etc
]
;
then
echo
"===> Configure disk usage agent"
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/usr/share/java/cc-base/disk-usage-agent-
${
CONFLUENT_VERSION
}
.jar=
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
echo
"===> Configure jolokia agent"
export
JOLOKIA_AGENT_PORT
=
${
JOLOKIA_AGENT_PORT
:-
7777
}
export
JOLOKIA_AGENT_HOST
=
${
JOLOKIA_AGENT_HOST
:-
"0.0.0.0"
}
if
[
-e
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
]
;
then
export
JOLOKIA_EXTRA_ARGS
=
",
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
)
"
fi
if
[
-e
"/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar"
]
;
then
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
else
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.3.6-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
fi
echo
"===> Configure prometheus JMX agent"
export
JMX_EXPORTER_AGENT_PORT
=
${
JMX_EXPORTER_AGENT_PORT
:-
7778
}
export
JMX_EXPORTER_AGENT_HOST
=
${
JMX_EXPORTER_AGENT_HOST
:-
"0.0.0.0"
}
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/opt/caas/lib/jmx_prometheus_javaagent-0.14.0.jar=
${
JMX_EXPORTER_AGENT_PORT
}
:/mnt/config/shared/jmx-exporter.yaml"
## requires for now but have to remove in the future iterations
## we need to remove javaagent from the "${CP_COMPONENT_SCRIPT_DIR}/jvm.config" as Operator addes as part of
## new stack deployment
echo
"===> Configure JVM config..."
EXTRA_ARGS
=
"
$(
sed
'/-javaagent*/d'
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
sed
'/^$/d'
|
tr
'\n'
' '
)
$EXTRA_ARGS
"
export
EXTRA_ARGS
else
echo
"===> Configure JVM config..."
EXTRA_ARGS
=
"
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
tr
'\n'
' '
)
${
EXTRA_ARGS
}
"
export
EXTRA_ARGS
fi
export
KAFKA_HEAP_OPTS
=
' '
export
KAFKA_JVM_PERFORMANCE_OPTS
=
' '
export
JMX_PORT
=
' '
exec
connect-distributed
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
\ No newline at end of file
scripts/confluentinc/connect/bin/run
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
export
CP_COMPONENT_NAME
=
connect
export
CP_COMPONENT_SCRIPT_DIR
=
/opt/confluentinc/etc/
${
CP_COMPONENT_NAME
}
export
CONNECT_CONFIG_DIR
=
/mnt/config
echo
"===> User"
id
export
OPERATOR_SCRIPT_DIR
=
/mnt/config/
${
CP_COMPONENT_NAME
}
echo
"===> Load
${
CP_COMPONENT_NAME
}
operator scripts from path
${
OPERATOR_SCRIPT_DIR
}
/bin"
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/configure
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/launch
\ No newline at end of file
scripts/confluentinc/controlcenter/bin/configure
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
if
[
!
-d
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
]
;
then
mkdir
-p
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
fi
cat
"
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/
${
CP_COMPONENT_NAME
}
.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
CONTROL_CENTER_CONFIG_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/log4j.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
CONTROL_CENTER_CONFIG_DIR
}
/log4j.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/disk-usage-agent.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
cat
"
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/jvm.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
cat
"
${
CONTROL_CENTER_CONFIG_DIR
}
/jvm.config"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
if
[
-e
"
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/jolokia.config"
]
;
then
cat
"
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/jolokia.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
fi
scripts/confluentinc/controlcenter/bin/launch
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
errexit
echo
"===> Adding log4j config ... "
export
CONTROL_CENTER_LOG4J_OPTS
=
"-Dlog4j.configuration=file:
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
##
## This condition is only required to work with older images
## TODO, this code needs to move removed as the metrics configurion
## is moved to the Operator code.
##
if
[
-d
/opt/confluent/etc
]
;
then
echo
"===> Configure disk usage agent"
export
CONTROL_CENTER_OPTS
=
"
${
CONTROL_CENTER_OPTS
}
-javaagent:/usr/share/java/cc-base/disk-usage-agent-
${
CONFLUENT_VERSION
}
.jar=
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
echo
"===> Configure jolokia agent"
export
JOLOKIA_AGENT_PORT
=
${
JOLOKIA_AGENT_PORT
:-
7777
}
export
JOLOKIA_AGENT_HOST
=
${
JOLOKIA_AGENT_HOST
:-
"0.0.0.0"
}
if
[
-e
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
]
;
then
export
JOLOKIA_EXTRA_ARGS
=
",
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
)
"
fi
if
[
-e
"/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar"
]
;
then
export
CONTROL_CENTER_OPTS
=
"
${
CONTROL_CENTER_OPTS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
else
export
CONTROL_CENTER_OPTS
=
"
${
CONTROL_CENTER_OPTS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.3.6-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
fi
echo
"===> Configure prometheus JMX agent"
export
JMX_EXPORTER_AGENT_PORT
=
${
JMX_EXPORTER_AGENT_PORT
:-
7778
}
export
JMX_EXPORTER_AGENT_HOST
=
${
JMX_EXPORTER_AGENT_HOST
:-
"0.0.0.0"
}
export
CONTROL_CENTER_OPTS
=
"
${
CONTROL_CENTER_OPTS
}
-javaagent:/opt/caas/lib/jmx_prometheus_javaagent-0.14.0.jar=
${
JMX_EXPORTER_AGENT_PORT
}
:/mnt/config/shared/jmx-exporter.yaml"
## requires for now but have to remove in the future iterations
## we need to remove javaagent from the "${CP_COMPONENT_SCRIPT_DIR}/jvm.config" as Operator addes as part of
## new stack deployment
echo
"===> Configure JVM config..."
CONTROL_CENTER_OPTS
=
"
$(
sed
'/-javaagent*/d'
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
sed
'/^$/d'
|
tr
'\n'
' '
)
$CONTROL_CENTER_OPTS
"
export
CONTROL_CENTER_OPTS
else
echo
"===> Configure JVM config..."
CONTROL_CENTER_OPTS
=
"
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
tr
'\n'
' '
)
${
CONTROL_CENTER_OPTS
}
"
export
CONTROL_CENTER_OPTS
fi
export
CONTROL_CENTER_HEAP_OPTS
=
' '
export
CONTROL_CENTER_JVM_PERFORMANCE_OPTS
=
' '
export
CONTROL_CENTER_JMX_OPTS
=
' '
export
JMX_PORT
=
' '
exec
control-center-start
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
\ No newline at end of file
scripts/confluentinc/controlcenter/bin/run
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
export
CP_COMPONENT_NAME
=
controlcenter
export
CP_COMPONENT_SCRIPT_DIR
=
/opt/confluentinc/etc/
${
CP_COMPONENT_NAME
}
export
CONTROL_CENTER_CONFIG_DIR
=
/mnt/config
echo
"===> User"
id
export
OPERATOR_SCRIPT_DIR
=
/mnt/config/
${
CP_COMPONENT_NAME
}
echo
"===> Load
${
CP_COMPONENT_NAME
}
operator scripts from path
${
OPERATOR_SCRIPT_DIR
}
/bin"
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/configure
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/launch
\ No newline at end of file
scripts/confluentinc/kafka/bin/configure
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
if
[
!
-d
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
]
;
then
mkdir
-p
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
fi
cat
"
${
KAFKA_CONFIG_DIR
}
/shared/
${
CP_COMPONENT_NAME
}
.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
KAFKA_CONFIG_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
KAFKA_CONFIG_DIR
}
/shared/log4j.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
KAFKA_CONFIG_DIR
}
/log4j.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
KAFKA_CONFIG_DIR
}
/shared/disk-usage-agent.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
cat
"
${
KAFKA_CONFIG_DIR
}
/shared/jvm.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
cat
"
${
KAFKA_CONFIG_DIR
}
/jvm.config"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
if
[
-e
"
${
KAFKA_CONFIG_DIR
}
/shared/jolokia.config"
]
;
then
cat
"
${
KAFKA_CONFIG_DIR
}
/shared/jolokia.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
fi
scripts/confluentinc/kafka/bin/launch
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
errexit
echo
"===> Configure log4j"
export
KAFKA_LOG4J_OPTS
=
"-Dlog4j.configuration=file:
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
##
## This condition is only required to work with older images
## TODO, this code needs to move removed as the metrics configurion
## is moved to the Operator code.
##
if
[
-d
/opt/confluent/etc
]
;
then
echo
"===> Configure disk usage agent"
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/usr/share/java/cc-base/disk-usage-agent-
${
CONFLUENT_VERSION
}
.jar=
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
echo
"===> Configure jolokia agent"
export
JOLOKIA_AGENT_PORT
=
${
JOLOKIA_AGENT_PORT
:-
7777
}
export
JOLOKIA_AGENT_HOST
=
${
JOLOKIA_AGENT_HOST
:-
"0.0.0.0"
}
if
[
-e
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
]
;
then
export
JOLOKIA_EXTRA_ARGS
=
",
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
)
"
fi
if
[
-e
"/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar"
]
;
then
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
else
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.3.6-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
fi
echo
"===> Configure prometheus JMX agent"
export
JMX_EXPORTER_AGENT_PORT
=
${
JMX_EXPORTER_AGENT_PORT
:-
7778
}
export
JMX_EXPORTER_AGENT_HOST
=
${
JMX_EXPORTER_AGENT_HOST
:-
"0.0.0.0"
}
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/opt/caas/lib/jmx_prometheus_javaagent-0.14.0.jar=
${
JMX_EXPORTER_AGENT_PORT
}
:/mnt/config/shared/jmx-exporter.yaml"
## requires for now but have to remove in the future iterations
## we need to remove javaagent from the "${CP_COMPONENT_SCRIPT_DIR}/jvm.config" as Operator addes as part of
## new stack deployment
echo
"===> Configure JVM config..."
EXTRA_ARGS
=
"
$(
sed
'/-javaagent*/d'
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
sed
'/^$/d'
|
tr
'\n'
' '
)
${
EXTRA_ARGS
}
"
export
EXTRA_ARGS
else
echo
"===> Configure JVM config..."
EXTRA_ARGS
=
"
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
tr
'\n'
' '
)
${
EXTRA_ARGS
}
"
export
EXTRA_ARGS
fi
export
KAFKA_HEAP_OPTS
=
' '
export
KAFKA_JVM_PERFORMANCE_OPTS
=
' '
export
JMX_PORT
=
' '
echo
"===> Launching
${
CP_COMPONENT_NAME
}
... "
# shellcheck disable=SC2086
exec
kafka-run-class
${
EXTRA_ARGS
}
kafka.Kafka
"
${
CP_COMPONENT_SCRIPT_DIR
}
/kafka.properties"
scripts/confluentinc/kafka/bin/run
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
export
CP_COMPONENT_NAME
=
kafka
export
CP_COMPONENT_SCRIPT_DIR
=
/opt/confluentinc/etc/
${
CP_COMPONENT_NAME
}
export
KAFKA_CONFIG_DIR
=
/mnt/config
echo
"===> User"
id
export
OPERATOR_SCRIPT_DIR
=
/mnt/config/
${
CP_COMPONENT_NAME
}
echo
"===> Load
${
CP_COMPONENT_NAME
}
operator scripts from path
${
OPERATOR_SCRIPT_DIR
}
/bin"
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/configure
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/launch
scripts/confluentinc/ksqldb/bin/configure
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
if
[
!
-d
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
]
;
then
mkdir
-p
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
fi
cat
"
${
KSQL_CONFIG_DIR
}
/shared/
${
CP_COMPONENT_NAME
}
.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
KSQL_CONFIG_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
KSQL_CONFIG_DIR
}
/shared/log4j.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
KSQL_CONFIG_DIR
}
/log4j.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
KSQL_CONFIG_DIR
}
/shared/disk-usage-agent.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
cat
"
${
KSQL_CONFIG_DIR
}
/shared/jvm.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
cat
"
${
KSQL_CONFIG_DIR
}
/jvm.config"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
if
[
-e
"
${
KSQL_CONFIG_DIR
}
/shared/jolokia.config"
]
;
then
cat
"
${
KSQL_CONFIG_DIR
}
/shared/jolokia.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
fi
# backward compatibility
if
[
-e
"
${
KSQL_CONFIG_DIR
}
/shared/server_jaas.conf"
]
;
then
cat
"
${
KSQL_CONFIG_DIR
}
/shared/server_jaas.conf >
${
CP_COMPONENT_SCRIPT_DIR
}
/server_jaas.conf"
fi
scripts/confluentinc/ksqldb/bin/launch
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2019 Confluent Inc.
#
set
-o
errexit
echo
"===> Adding log4j config ... "
export
KSQL_LOG4J_OPTS
=
"-Dlog4j.configuration=file:
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
##
## This condition is only required to work with older images
## TODO, this code needs to move removed as the metrics configurion
## is moved to the Operator code.
##
if
[
-d
/opt/confluent/etc
]
;
then
echo
"===> Configure disk usage agent"
export
KSQL_OPTS
=
"
${
KSQL_OPTS
}
-javaagent:/usr/share/java/cc-base/disk-usage-agent-
${
CONFLUENT_VERSION
}
.jar=
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
echo
"===> Configure jolokia agent"
export
JOLOKIA_AGENT_PORT
=
${
JOLOKIA_AGENT_PORT
:-
7777
}
export
JOLOKIA_AGENT_HOST
=
${
JOLOKIA_AGENT_HOST
:-
"0.0.0.0"
}
if
[
-e
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
]
;
then
export
JOLOKIA_EXTRA_ARGS
=
",
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
)
"
fi
if
[
-e
"/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar"
]
;
then
export
KSQL_OPTS
=
"
${
KSQL_OPTS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
else
export
KSQL_OPTS
=
"
${
KSQL_OPTS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.3.6-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
fi
echo
"===> Configure prometheus JMX agent"
export
JMX_EXPORTER_AGENT_PORT
=
${
JMX_EXPORTER_AGENT_PORT
:-
7778
}
export
JMX_EXPORTER_AGENT_HOST
=
${
JMX_EXPORTER_AGENT_HOST
:-
"0.0.0.0"
}
export
KSQL_OPTS
=
"
${
KSQL_OPTS
}
-javaagent:/opt/caas/lib/jmx_prometheus_javaagent-0.14.0.jar=
${
JMX_EXPORTER_AGENT_PORT
}
:/mnt/config/shared/jmx-exporter.yaml"
## requires for now but have to remove in the future iterations
## we need to remove javaagent from the "${CP_COMPONENT_SCRIPT_DIR}/jvm.config" as Operator addes as part of
## new stack deployment
echo
"===> Configure JVM config..."
KSQL_OPTS
=
"
$(
sed
'/-javaagent*/d'
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
sed
'/^$/d'
|
tr
'\n'
' '
)
$KSQL_OPTS
"
export
KSQL_OPTS
# for basic authentication, only for backward compabilitiy
if
[
-e
"
${
CP_COMPONENT_SCRIPT_DIR
}
/server_jaas.conf"
]
;
then
export
KSQL_OPTS
=
"
${
KSQL_OPTS
}
-Djava.security.auth.login.config=
${
CP_COMPONENT_SCRIPT_DIR
}
/server_jaas.conf"
fi
echo
"===> Adding KSQL healthcheck Jars in classPath ... "
export
KSQL_CLASSPATH
=
${
KSQL_CLASSPATH
}
:
"/opt/confluent/ksql/libs/*"
else
echo
"===> Configure JVM config..."
KSQL_OPTS
=
"
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
tr
'\n'
' '
)
${
KSQL_OPTS
}
"
export
KSQL_OPTS
fi
# These ensure that the "if" sections for heap sizing, GC tuning, and JMX opts in SR launch script do not trigger.
export
KSQL_HEAP_OPTS
=
' '
export
KSQL_JMX_OPTS
=
' '
export
KSQL_JVM_PERFORMANCE_OPTS
=
' '
export
JMX_PORT
=
' '
## not in-us, just a place-holder
export
LOG_DIR
=
/mnt/log
echo
"===> Launching
${
CP_COMPONENT_NAME
}
... "
exec
ksql-run-class io.confluent.ksql.rest.server.KsqlServerMain
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
scripts/confluentinc/ksqldb/bin/run
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
export
CP_COMPONENT_NAME
=
ksqldb
export
CP_COMPONENT_SCRIPT_DIR
=
/opt/confluentinc/etc/
${
CP_COMPONENT_NAME
}
export
KSQL_CONFIG_DIR
=
/mnt/config
echo
"===> User"
id
export
OPERATOR_SCRIPT_DIR
=
/mnt/config/
${
CP_COMPONENT_NAME
}
echo
"===> Load
${
CP_COMPONENT_NAME
}
operator scripts from path
${
OPERATOR_SCRIPT_DIR
}
/bin"
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/configure
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/launch
\ No newline at end of file
scripts/confluentinc/replicator/bin/configure
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
if
[
!
-d
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
]
;
then
mkdir
-p
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
fi
cat
"
${
CONNECT_CONFIG_DIR
}
/shared/
${
CP_COMPONENT_NAME
}
.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
CONNECT_CONFIG_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
CONNECT_CONFIG_DIR
}
/shared/log4j.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
CONNECT_CONFIG_DIR
}
/log4j.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
CONNECT_CONFIG_DIR
}
/shared/disk-usage-agent.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
cat
"
${
CONNECT_CONFIG_DIR
}
/shared/jvm.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
cat
"
${
CONNECT_CONFIG_DIR
}
/jvm.config"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
if
[
-e
"
${
CONNECT_CONFIG_DIR
}
/shared/jolokia.config"
]
;
then
cat
"
${
CONNECT_CONFIG_DIR
}
/shared/jolokia.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
fi
scripts/confluentinc/replicator/bin/launch
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
errexit
echo
"===> Adding log4j config ... "
export
KAFKA_LOG4J_OPTS
=
"-Dlog4j.configuration=file:
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
##
## This condition is only required to work with older images
## TODO, this code needs to move removed as the metrics configurion
## is moved to the Operator code.
##
if
[
-d
/opt/confluent/etc
]
;
then
echo
"===> Configure disk usage agent"
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/usr/share/java/cc-base/disk-usage-agent-
${
CONFLUENT_VERSION
}
.jar=
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
echo
"===> Configure jolokia agent"
export
JOLOKIA_AGENT_PORT
=
${
JOLOKIA_AGENT_PORT
:-
7777
}
export
JOLOKIA_AGENT_HOST
=
${
JOLOKIA_AGENT_HOST
:-
"0.0.0.0"
}
if
[
-e
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
]
;
then
export
JOLOKIA_EXTRA_ARGS
=
",
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
)
"
fi
if
[
-e
"/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar"
]
;
then
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
else
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.3.6-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
fi
echo
"===> Configure prometheus JMX agent"
export
JMX_EXPORTER_AGENT_PORT
=
${
JMX_EXPORTER_AGENT_PORT
:-
7778
}
export
JMX_EXPORTER_AGENT_HOST
=
${
JMX_EXPORTER_AGENT_HOST
:-
"0.0.0.0"
}
export
EXTRA_ARGS
=
"
${
EXTRA_ARGS
}
-javaagent:/opt/caas/lib/jmx_prometheus_javaagent-0.14.0.jar=
${
JMX_EXPORTER_AGENT_PORT
}
:/mnt/config/shared/jmx-exporter.yaml"
## requires for now but have to remove in the future iterations
## we need to remove javaagent from the "${CP_COMPONENT_SCRIPT_DIR}/jvm.config" as Operator addes as part of
## new stack deployment
echo
"===> Configure JVM config..."
EXTRA_ARGS
=
"
$(
sed
'/-javaagent*/d'
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
sed
'/^$/d'
|
tr
'\n'
' '
)
$EXTRA_ARGS
"
export
EXTRA_ARGS
else
echo
"===> Configure JVM config..."
EXTRA_ARGS
=
"
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
tr
'\n'
' '
)
${
EXTRA_ARGS
}
"
export
EXTRA_ARGS
fi
export
KAFKA_HEAP_OPTS
=
' '
export
KAFKA_JVM_PERFORMANCE_OPTS
=
' '
export
JMX_PORT
=
' '
exec
connect-distributed
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
\ No newline at end of file
scripts/confluentinc/replicator/bin/run
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
export
CP_COMPONENT_NAME
=
replicator
export
CP_COMPONENT_SCRIPT_DIR
=
/opt/confluentinc/etc/
${
CP_COMPONENT_NAME
}
export
CONNECT_CONFIG_DIR
=
/mnt/config
echo
"===> User"
id
export
OPERATOR_SCRIPT_DIR
=
/mnt/config/
${
CP_COMPONENT_NAME
}
echo
"===> Load
${
CP_COMPONENT_NAME
}
operator scripts from path
${
OPERATOR_SCRIPT_DIR
}
/bin"
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/configure
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/launch
\ No newline at end of file
scripts/confluentinc/schemaregistry/bin/configure
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
if
[
!
-d
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
]
;
then
mkdir
-p
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
fi
cat
"
${
SR_CONFIG_DIR
}
/shared/
${
CP_COMPONENT_NAME
}
.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
SR_CONFIG_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
SR_CONFIG_DIR
}
/shared/log4j.properties"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
SR_CONFIG_DIR
}
/log4j.properties"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
SR_CONFIG_DIR
}
/shared/jvm.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
cat
"
${
SR_CONFIG_DIR
}
/jvm.config"
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
if
[
-e
"
${
SR_CONFIG_DIR
}
/shared/jolokia.config"
]
;
then
cat
"
${
SR_CONFIG_DIR
}
/shared/jolokia.config"
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
fi
scripts/confluentinc/schemaregistry/bin/launch
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2018 Confluent Inc.
#
set
-o
errexit
echo
"===> Adding log4j config ... "
export
SCHEMA_REGISTRY_LOG4J_OPTS
=
"-Dlog4j.configuration=file:
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
if
[
-d
/opt/confluent/etc
]
;
then
echo
"===> Configure jolokia agent"
export
JOLOKIA_AGENT_PORT
=
${
JOLOKIA_AGENT_PORT
:-
7777
}
export
JOLOKIA_AGENT_HOST
=
${
JOLOKIA_AGENT_HOST
:-
"0.0.0.0"
}
if
[
-e
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
]
;
then
export
JOLOKIA_EXTRA_ARGS
=
",
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
)
"
fi
if
[
-e
"/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar"
]
;
then
export
SCHEMA_REGISTRY_OPTS
=
"
${
SCHEMA_REGISTRY_OPTS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.6.2-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
else
export
SCHEMA_REGISTRY_OPTS
=
"
${
SCHEMA_REGISTRY_OPTS
}
-javaagent:/opt/caas/lib/jolokia/jolokia-jvm-1.3.6-agent.jar=port=
${
JOLOKIA_AGENT_PORT
}
,host=
${
JOLOKIA_AGENT_HOST
}${
JOLOKIA_EXTRA_ARGS
}
"
fi
echo
"===> Configure prometheus JMX agent"
export
JMX_EXPORTER_AGENT_PORT
=
${
JMX_EXPORTER_AGENT_PORT
:-
7778
}
export
JMX_EXPORTER_AGENT_HOST
=
${
JMX_EXPORTER_AGENT_HOST
:-
"0.0.0.0"
}
export
SCHEMA_REGISTRY_OPTS
=
"
${
SCHEMA_REGISTRY_OPTS
}
-javaagent:/opt/caas/lib/jmx_prometheus_javaagent-0.14.0.jar=
${
JMX_EXPORTER_AGENT_PORT
}
:/mnt/config/shared/jmx-exporter.yaml"
## requires for now but have to remove in the future iterations
## we need to remove javaagent from the "${CP_COMPONENT_SCRIPT_DIR}/jvm.config" as Operator addes as part of
## new stack deployment
echo
"===> Configure JVM config..."
SCHEMA_REGISTRY_OPTS
=
"
$(
sed
'/-javaagent*/d'
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
sed
'/^$/d'
|
tr
'\n'
' '
)
${
SCHEMA_REGISTRY_OPTS
}
"
export
SCHEMA_REGISTRY_OPTS
else
echo
"===> Configure JVM config..."
SCHEMA_REGISTRY_OPTS
=
"
$(
cat
<
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
|
tr
'\n'
' '
)
${
SCHEMA_REGISTRY_OPTS
}
"
export
SCHEMA_REGISTRY_OPTS
fi
# These ensure that the "if" sections for heap sizing, GC tuning, and JMX opts in SR launch script do not trigger.
export
SCHEMA_REGISTRY_HEAP_OPTS
=
' '
export
SCHEMA_REGISTRY_JMX_OPTS
=
' '
export
SCHEMA_REGISTRY_JVM_PERFORMANCE_OPTS
=
' '
export
JMX_PORT
=
' '
exec
schema-registry-start
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
scripts/confluentinc/schemaregistry/bin/run
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
export
CP_COMPONENT_NAME
=
schemaregistry
export
CP_COMPONENT_SCRIPT_DIR
=
/opt/confluentinc/etc/
${
CP_COMPONENT_NAME
}
export
SR_CONFIG_DIR
=
/mnt/config
echo
"===> User"
id
export
OPERATOR_SCRIPT_DIR
=
/mnt/config/
${
CP_COMPONENT_NAME
}
echo
"===> Load
${
CP_COMPONENT_NAME
}
operator scripts from path
${
OPERATOR_SCRIPT_DIR
}
/bin"
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/configure
"
${
OPERATOR_SCRIPT_DIR
}
"
/bin/launch
\ No newline at end of file
scripts/confluentinc/zookeeper/bin/configure
0 → 100755
View file @
7ef0bc37
#!/usr/bin/env bash
#
# Copyright 2020 Confluent Inc.
#
set
-o
nounset
set
-o
errexit
if
[
!
-d
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
]
;
then
mkdir
-p
"
${
CP_COMPONENT_SCRIPT_DIR
}
"
fi
# load configuration
cat
"
${
ZOOKEEPER_CONFIG_DIR
}
/myid"
>
"
${
ZOOKEEPER_DATA_DIR
}
/myid"
cat
"
${
ZOOKEEPER_CONFIG_DIR
}
"
/shared/zookeeper.properties
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
ZOOKEEPER_CONFIG_DIR
}
"
/zookeeper.properties
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/
${
CP_COMPONENT_NAME
}
.properties"
cat
"
${
ZOOKEEPER_CONFIG_DIR
}
"
/shared/log4j.properties
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
ZOOKEEPER_CONFIG_DIR
}
"
/log4j.properties
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/log4j.properties"
cat
"
${
ZOOKEEPER_CONFIG_DIR
}
"
/shared/disk-usage-agent.properties
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/disk-usage-agent.properties"
cat
"
${
ZOOKEEPER_CONFIG_DIR
}
"
/shared/jvm.config
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
cat
"
${
ZOOKEEPER_CONFIG_DIR
}
"
/jvm.config
>>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jvm.config"
if
[
-e
"
${
ZOOKEEPER_CONFIG_DIR
}
/shared/jolokia.config"
]
;
then
cat
"
${
ZOOKEEPER_CONFIG_DIR
}
"
/shared/jolokia.config
>
"
${
CP_COMPONENT_SCRIPT_DIR
}
/jolokia.config"
fi
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment