Skip to content

Commit

Permalink
remove metricsserver and metricsgateway code, adjust integration test…
Browse files Browse the repository at this point in the history
…s to work with a brand new logcache mock, get rid of appinstancemetrics database table
  • Loading branch information
geigerj0 committed Jun 7, 2024
1 parent 653f497 commit 75ac14e
Show file tree
Hide file tree
Showing 72 changed files with 305 additions and 8,468 deletions.
4 changes: 0 additions & 4 deletions jobs/operator/spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ templates:
appmetrics_db.crt.erb: config/certs/appmetrics_db/crt
appmetrics_db.key.erb: config/certs/appmetrics_db/key

appinstancemetrics_db_ca.crt.erb: config/certs/instancemetrics_db/ca.crt
appinstancemetrics_db.crt.erb: config/certs/instancemetrics_db/crt
appinstancemetrics_db.key.erb: config/certs/instancemetrics_db/key

lock_db_ca.crt.erb: config/certs/lock_db/ca.crt
lock_db.crt.erb: config/certs/lock_db/crt
lock_db.key.erb: config/certs/lock_db/key
Expand Down
3 changes: 0 additions & 3 deletions jobs/operator/templates/appinstancemetrics_db.crt.erb

This file was deleted.

3 changes: 0 additions & 3 deletions jobs/operator/templates/appinstancemetrics_db.key.erb

This file was deleted.

3 changes: 0 additions & 3 deletions jobs/operator/templates/appinstancemetrics_db_ca.crt.erb

This file was deleted.

14 changes: 13 additions & 1 deletion scripts/generate_test_certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ ${CERTSTRAP} --depot-path "${depot_path}" init --passphrase '' --common-name aut
mv -f "${depot_path}"/autoscalerCA.crt "${depot_path}"/autoscaler-ca.crt
mv -f "${depot_path}"/autoscalerCA.key "${depot_path}"/autoscaler-ca.key

# CA to distribute to dummy loggregator_agent certs
${CERTSTRAP} --depot-path "${depot_path}" init --passphrase '' --common-name loggregatorCA --years "20"
mv -f "${depot_path}"/loggregatorCA.crt "${depot_path}"/loggregator-ca.crt
mv -f "${depot_path}"/loggregatorCA.key "${depot_path}"/loggregator-ca.key

# CA to distribute to dummy syslog emitter certs
${CERTSTRAP} --depot-path "${depot_path}" init --passphrase '' --common-name LogCacheSyslogServerCA --years "20"
mv -f "${depot_path}"/LogCacheSyslogServerCA.crt "${depot_path}"/log-cache-syslog-server-ca.crt
Expand Down Expand Up @@ -69,7 +74,6 @@ ${CERTSTRAP} --depot-path "${depot_path}" sign scheduler --CA autoscaler-ca --ye
openssl pkcs12 -export -in "${depot_path}"/scheduler.crt -inkey "${depot_path}"/scheduler.key -out "${depot_path}"/scheduler.p12 -name scheduler -password pass:123456
keytool -importcert -alias autoscaler -file "${depot_path}"/autoscaler-ca.crt -keystore "${depot_path}"/autoscaler.truststore -storeType pkcs12 -storepass 123456 -noprompt


# # loggregator test server certificate
${CERTSTRAP} --depot-path "${depot_path}" request-cert --passphrase '' --domain reverselogproxy
${CERTSTRAP} --depot-path "${depot_path}" sign reverselogproxy --CA autoscaler-ca --years "20"
Expand All @@ -86,10 +90,18 @@ ${CERTSTRAP} --depot-path "${depot_path}" sign metricserver --CA autoscaler-ca -
${CERTSTRAP} --depot-path "${depot_path}" request-cert --passphrase '' --domain metricserver_client
${CERTSTRAP} --depot-path "${depot_path}" sign metricserver_client --CA autoscaler-ca --years "20"

# metricsforwarder certificate for loggregator_agent
${CERTSTRAP} --depot-path "${depot_path}" request-cert --passphrase '' --domain metron
${CERTSTRAP} --depot-path "${depot_path}" sign metron --CA loggregator-ca --years "20"

# metricsforwarder certificate for log-cache-syslog-server
${CERTSTRAP} --depot-path "${depot_path}" request-cert --passphrase '' --domain cf-app
${CERTSTRAP} --depot-path "${depot_path}" sign cf-app --CA log-cache-syslog-server-ca --years "20"

# log-cache certificate
${CERTSTRAP} --depot-path "${depot_path}" request-cert --passphrase '' --domain log-cache --ip 127.0.0.1
${CERTSTRAP} --depot-path "${depot_path}" sign log-cache --CA autoscaler-ca --years "20"

# mTLS client certificate for local testing
## certstrap with multiple OU not working at the moment. Pull request is created in the upstream. Therefore, using openssl at the moment
## https://github.com/square/certstrap/pull/120
Expand Down
190 changes: 0 additions & 190 deletions src/autoscaler/db/sqldb/instancemetrics_sqldb.go

This file was deleted.

Loading

0 comments on commit 75ac14e

Please sign in to comment.