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-enterprise-control-center-operator-5.5.x
Commits
1cd7eecf
Commit
1cd7eecf
authored
Dec 18, 2020
by
SonicDeathMonkey
Browse files
cleanup
parent
7fcbdeec
Pipeline
#109205
passed with stage
in 11 seconds
Changes
6
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
240 deletions
+0
-240
scripts/caas/bin/configure
scripts/caas/bin/configure
+0
-167
scripts/caas/bin/ensure
scripts/caas/bin/ensure
+0
-15
scripts/caas/bin/launch
scripts/caas/bin/launch
+0
-37
scripts/caas/bin/run
scripts/caas/bin/run
+0
-18
scripts/caas/templates/jmx-exporter.yaml.j2
scripts/caas/templates/jmx-exporter.yaml.j2
+0
-2
scripts/licenses/confluent.txt
scripts/licenses/confluent.txt
+0
-1
No files found.
scripts/caas/bin/configure
deleted
100755 → 0
View file @
7fcbdeec
#!/usr/bin/env bash
#
# Copyright 2018 Confluent Inc.
#
set
-o
nounset
\
-o
errexit
dub ensure CONTROL_CENTER_DATA_DIR
dub ensure CONTROL_CENTER_CONFIG_DIR
dub ensure CONTROL_CENTER_SECRETS_DIR
dub ensure CAAS_POD_ID
echo
"===> Check if
${
CONTROL_CENTER_CONFIG_DIR
}
is writable ..."
dub path
"
${
CONTROL_CENTER_CONFIG_DIR
}
"
writable
echo
"===> Check if
${
CONTROL_CENTER_DATA_DIR
}
is writable ..."
dub path
"
${
CONTROL_CENTER_DATA_DIR
}
"
writable
if
[
-e
/mnt/secrets/jksPassword.txt
]
;
then
export
KEYSTOREPASSWORD
=
$(
echo
$(
cat
/mnt/secrets/jksPassword.txt |
cut
-d
'='
-f2-
)
|
sed
's/ *$//g'
)
else
export
KEYSTOREPASSWORD
=
mystorepassword
fi
## C3 SSL configuration
##
create_keystore
()
{
keystore_path
=
$1
extra_certfile
=
${
2
:-
""
}
if
[
-e
/mnt/sslcerts/fullchain.pem
]
&&
[
-e
/mnt/sslcerts/privkey.pem
]
;
then
args
=
"-export
-in /mnt/sslcerts/fullchain.pem
-inkey /mnt/sslcerts/privkey.pem
-out /tmp/pkcs.p12
-name
${
COMPONENT
}
-passout pass:mykeypassword"
if
[
!
-z
${
extra_certfile
}
]
&&
[
-e
${
extra_certfile
}
]
;
then
args
=
"
${
args
}
-certfile
${
extra_certfile
}
"
fi
openssl pkcs12
${
args
}
keytool
-importkeystore
\
-deststorepass
${
KEYSTOREPASSWORD
}
\
-destkeypass
${
KEYSTOREPASSWORD
}
\
-destkeystore
${
keystore_path
}
\
-deststoretype
pkcs12
\
-srckeystore
/tmp/pkcs.p12
\
-srcstoretype
PKCS12
\
-srcstorepass
mykeypassword
fi
}
create_keystore /tmp/keystore.jks
##
## Put all CAs provided as part of caCerts.pem file to truststore
##
if
[
-e
/mnt/sslcerts/cacerts.pem
]
;
then
mkdir
-p
/tmp/trustCAs
cat
/mnt/sslcerts/cacerts.pem |
awk
'split_after==1{n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1} {print > ("/tmp/trustCAs/ca" n ".pem")}'
for
file
in
/tmp/trustCAs/
*
;
do
fileName
=
"
${
file
##*/
}
"
keytool
-import
\
-trustcacerts
\
-alias
"
$fileName
"
\
-file
"
$file
"
\
-keystore
/tmp/truststore.jks
\
-deststorepass
${
KEYSTOREPASSWORD
}
\
-noprompt
done
fi
##
## Control-center configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/
${
COMPONENT
}
.properties
>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## Pod specific configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/
${
COMPONENT
}
.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
##
## Internal Topic configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/internal-topic.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## Stream Monitoring Topic configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/monitoring-interceptor-topic.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
##
## Metrics Topic configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/metrics-topic.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## Components configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/components.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## kafka_security configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/streams.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## UI https configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/https.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## Command topic configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/command-topic.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## Producer/Consumer topic configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/producer-consumer.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## Connect configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/connect.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## Email configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/email.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## Alert configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/alert.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
##
## Log4J configuration
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/log4j.properties
>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/log4j.properties
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/log4j.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/log4j.properties
##
## UI Authentication configuration
##
if
[
-e
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/ui-authentication.properties
]
\
&&
[
-e
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/login.properties
]
\
&&
[
-e
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/propertyfile.jaas
]
;
then
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/ui-authentication.properties
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/login.properties
>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/login.properties
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/propertyfile.jaas
>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/propertyfile.jaas
fi
##
## Control-Center's managed Kafka JAAS file
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/c3-kafka-client-jaas.conf
>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/c3-kafka-client-jaas.conf
##
## JVM configurations
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/jvm.config
>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/jvm.config
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/jvm.config
>>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/jvm.config
##
## JOLOKIA Configurations
##
if
[
-e
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/jolokia.config
]
;
then
create_keystore /tmp/jolokia-keystore.jks /mnt/sslcerts/cacerts.pem
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/jolokia.config
>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/jolokia.config
fi
##
## JMX Prometheus Configurations
##
cp
/opt/caas/templates/jmx-exporter.yaml.j2
${
COMPONENT_SCRIPT_DIR
}
/jmx-exporter.yaml
##
## Disk Usage agent that pushes information to mbeans which can be access through JMX
##
cat
${
CONTROL_CENTER_CONFIG_DIR
}
/shared/disk-usage-agent.properties
>
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/disk-usage-agent.properties
find
${
COMPONENT_SCRIPT_DIR
}
-type
f | xargs
sed
-i
"s/<<keystorepassword>>/
${
KEYSTOREPASSWORD
}
/g"
scripts/caas/bin/ensure
deleted
100755 → 0
View file @
7fcbdeec
#!/usr/bin/env bash
#
# Copyright 2018 Confluent Inc.
#
set
-o
errexit
echo
"===> Check if Kafka is healthy ..."
export
CONTROL_CENTER_BOOTSTRAP_SERVERS
=
$(
grep
'^bootstrap.servers'
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties |
cut
-d
'='
-f
2
)
export
CONTROL_CENTER_REPLICATION_FACTOR
=
$(
grep
-w
'confluent.controlcenter.internal.topics.replication'
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties |
cut
-d
'='
-f
2
)
cub kafka-ready
"
${
CONTROL_CENTER_REPLICATION_FACTOR
}
"
\
"
${
CONTROL_CENTER_CUB_KAFKA_TIMEOUT
:-
40
}
"
\
-b
"
${
CONTROL_CENTER_BOOTSTRAP_SERVERS
}
"
\
--config
"
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/c3-kafka-client-jaas.conf"
scripts/caas/bin/launch
deleted
100755 → 0
View file @
7fcbdeec
#!/usr/bin/env bash
#
# Copyright 2018 Confluent Inc.
#
set
-o
errexit
if
[[
-e
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/propertyfile.jaas
]]
;
then
export
CONTROL_CENTER_OPTS
=
"-Djava.security.auth.login.config=
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/propertyfile.jaas"
fi
echo
"===> Adding disk usage agent to the java command ... "
export
CONTROL_CENTER_OPTS
=
"
${
CONTROL_CENTER_OPTS
}
-javaagent:/usr/share/java/cc-base/disk-usage-agent-
${
CONFLUENT_VERSION
}
.jar=
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/disk-usage-agent.properties"
echo
"===> Adding jolokia agent to the java command ... "
export
JOLOKIA_AGENT_PORT
=
${
JOLOKIA_AGENT_PORT
:-
7777
}
export
JOLOKIA_AGENT_HOST
=
${
JOLOKIA_AGENT_HOST
:-
"0.0.0.0"
}
if
[
-e
"
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/jolokia.config"
]
;
then
export
JOLOKIA_EXTRA_ARGS
=
",
$(
cat
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/jolokia.config | xargs
)
"
fi
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
}
"
echo
"===> Adding jmx exporter to the java command ... "
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
}
:
${
COMPONENT_SCRIPT_DIR
}
/jmx-exporter.yaml"
echo
"===> Adding JVM config to the java command ... "
export
CONTROL_CENTER_OPTS
=
"
$(
cat
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/jvm.config | xargs
)
${
CONTROL_CENTER_OPTS
}
"
echo
"===> Launching
${
COMPONENT
}
... "
export
CONTROL_CENTER_LOG4J_OPTS
=
"-Dlog4j.configuration=file:
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/log4j.properties"
export
CONTROL_CENTER_HEAP_OPTS
=
' '
export
CONTROL_CENTER_JVM_PERFORMANCE_OPTS
=
' '
export
CONTROL_CENTER_JMX_OPTS
=
' '
export
JMX_PORT
=
' '
exec
${
COMPONENT
}
-start
${
COMPONENT_SCRIPT_DIR
}
/
${
COMPONENT
}
/
${
COMPONENT
}
.properties
\ No newline at end of file
scripts/caas/bin/run
deleted
100755 → 0
View file @
7fcbdeec
#!/usr/bin/env bash
#
# Copyright 2018 Confluent Inc.
#
set
-o
nounset
\
-o
errexit
echo
"===> User"
id
echo
"===> Configuring ..."
${
DOCKER_SCRIPT_DIR
}
/configure
echo
"===> Running preflight checks ... "
${
DOCKER_SCRIPT_DIR
}
/ensure
echo
"===> Launching ... "
exec
${
DOCKER_SCRIPT_DIR
}
/launch
\ No newline at end of file
scripts/caas/templates/jmx-exporter.yaml.j2
deleted
100644 → 0
View file @
7fcbdeec
lowercaseOutputLabelNames: false
lowercaseOutputName: true
scripts/licenses/confluent.txt
deleted
100644 → 0
View file @
7fcbdeec
Copyright 2020 Confluent, Inc.
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