From deb6d826af9bbbff8bbe64dbbbc04bff8a470ce6 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Thu, 15 Jun 2023 21:21:23 +0200 Subject: [PATCH] Cleanup unused Dockerfile entries These files are currently unused and are referencing really old version often that can't even build anymore these days. Signed-off-by: Dirkjan Bussink --- docker/bootstrap/Dockerfile.mysql57-arm64v8 | 65 ---------- docker/bootstrap/build.sh | 8 +- docker/k8s/orchestrator/Dockerfile | 38 ------ docker/k8s/pmm-client/Dockerfile | 35 ------ docker/mini/orchestrator-up.sh | 19 --- .../mini/orchestrator-vitess-mini.conf.json | 65 ---------- docker/orchestrator/Dockerfile | 38 ------ docker/orchestrator/build.sh | 37 ------ docker/orchestrator/orchestrator.conf.json | 114 ------------------ 9 files changed, 3 insertions(+), 416 deletions(-) delete mode 100644 docker/bootstrap/Dockerfile.mysql57-arm64v8 delete mode 100644 docker/k8s/orchestrator/Dockerfile delete mode 100644 docker/k8s/pmm-client/Dockerfile delete mode 100755 docker/mini/orchestrator-up.sh delete mode 100644 docker/mini/orchestrator-vitess-mini.conf.json delete mode 100644 docker/orchestrator/Dockerfile delete mode 100755 docker/orchestrator/build.sh delete mode 100644 docker/orchestrator/orchestrator.conf.json diff --git a/docker/bootstrap/Dockerfile.mysql57-arm64v8 b/docker/bootstrap/Dockerfile.mysql57-arm64v8 deleted file mode 100644 index 96b08413aa1..00000000000 --- a/docker/bootstrap/Dockerfile.mysql57-arm64v8 +++ /dev/null @@ -1,65 +0,0 @@ -FROM debian:9 AS builder - -WORKDIR /opt -#Build xtrabackup -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - autoconf \ - automake \ - bison \ - build-essential \ - bzr \ - ca-certificates \ - cmake \ - flex \ - libaio-dev \ - libcurl4-gnutls-dev \ - libev-dev \ - libgcrypt11-dev \ - libncurses-dev \ - libtool \ - mysql-client \ - vim-common \ - wget \ - zlib1g-dev && \ - wget https://github.com/percona/percona-xtrabackup/archive/percona-xtrabackup-2.4.13.tar.gz \ - -P /opt && \ - tar zxf /opt/percona-xtrabackup-2.4.13.tar.gz -C /opt && \ - rm /opt/percona-xtrabackup-2.4.13.tar.gz && \ - cd /opt/percona-xtrabackup-percona-xtrabackup-2.4.13 && \ - mkdir bld && cd bld && \ - cmake .. -DBUILD_CONFIG=xtrabackup_release -DWITH_MAN_PAGES=OFF \ - -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local && \ - make -j4 && \ - make install - -ARG bootstrap_version -ARG image="vitess/bootstrap:${bootstrap_version}-common" - -FROM --platform=linux/arm64/v8 "${image}" - -# Install MySQL 5.7 -RUN add-apt-repository 'deb http://ftp.debian.org/debian sid main' && \ - apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - libmysqlclient-dev \ - mysql-client-5.7 \ - mysql-server-5.7 \ - libdbd-mysql-perl \ - python3-distutils-extra \ - rsync \ - libev4 \ - libcurl4-openssl-dev \ - libaio1 && \ - rm -rf /var/lib/apt/lists/* && \ - mkdir -p /usr/local/xtrabackup/bin && \ - mkdir -p /usr/local/xtrabackup/lib - -# Bootstrap Vitess -WORKDIR /vt/src/vitess.io/vitess -COPY --from=builder /usr/local/xtrabackup/bin /usr/local/xtrabackup/bin -COPY --from=builder /usr/local/xtrabackup/lib /usr/local/xtrabackup/lib -ENV PATH="/usr/local/xtrabackup/bin:${PATH}" -ENV MYSQL_FLAVOR MySQL56 -USER vitess -RUN ./bootstrap.sh diff --git a/docker/bootstrap/build.sh b/docker/bootstrap/build.sh index a3ac24d916d..8cc6a151606 100755 --- a/docker/bootstrap/build.sh +++ b/docker/bootstrap/build.sh @@ -47,11 +47,9 @@ fi chmod -R o=rx *; arch=$(uname -m) -[ "$arch" == "aarch64" ] && [ $flavor != "common" ] && arch_ext='-arm64v8' - base_image="${base_image:-vitess/bootstrap:$version-common}" -image="${image:-vitess/bootstrap:$version-$flavor$arch_ext}" +image="${image:-vitess/bootstrap:$version-$flavor}" while [ $# -gt 0 ]; do if [[ $1 == *"--"* ]]; then @@ -61,6 +59,6 @@ while [ $# -gt 0 ]; do shift done -if [ -f "docker/bootstrap/Dockerfile.$flavor$arch_ext" ]; then - docker build --no-cache -f docker/bootstrap/Dockerfile.$flavor$arch_ext -t $image --build-arg bootstrap_version=$version --build-arg image=$base_image . +if [ -f "docker/bootstrap/Dockerfile.$flavor" ]; then + docker build --no-cache -f docker/bootstrap/Dockerfile.$flavor -t $image --build-arg bootstrap_version=$version --build-arg image=$base_image . fi diff --git a/docker/k8s/orchestrator/Dockerfile b/docker/k8s/orchestrator/Dockerfile deleted file mode 100644 index e3e8f3ac346..00000000000 --- a/docker/k8s/orchestrator/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -ARG VT_BASE_VER=latest -ARG DEBIAN_VER=stable-slim - -FROM vitess/k8s:${VT_BASE_VER} AS k8s - -FROM debian:${DEBIAN_VER} -ARG ORC_VER='3.2.3' - -RUN apt-get update && \ - apt-get upgrade -qq && \ - apt-get install wget ca-certificates jq -qq --no-install-recommends && \ - wget https://github.com/openark/orchestrator/releases/download/v${ORC_VER}/orchestrator_${ORC_VER}_amd64.deb && \ - dpkg -i orchestrator_${ORC_VER}_amd64.deb && \ - rm orchestrator_${ORC_VER}_amd64.deb && \ - apt-get purge wget -qq && \ - apt-get autoremove -qq && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Copy vtctlclient to be used to notify -COPY --from=k8s /vt/bin/vtctlclient /usr/bin/ - -WORKDIR /usr/local/orchestrator -CMD ["./orchestrator", "--config=/conf/orchestrator.conf.json", "http"] diff --git a/docker/k8s/pmm-client/Dockerfile b/docker/k8s/pmm-client/Dockerfile deleted file mode 100644 index 732e2e0a2ee..00000000000 --- a/docker/k8s/pmm-client/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -ARG VT_BASE_VER=latest -ARG DEBIAN_VER=stable-slim - -FROM vitess/k8s:${VT_BASE_VER} AS k8s - -FROM debian:${DEBIAN_VER} -ARG PMM_CLIENT_VER='1.17.4' - -RUN apt-get update && \ - apt-get upgrade -qq && \ - apt-get install procps wget ca-certificates -qq --no-install-recommends && \ - wget https://www.percona.com/redir/downloads/pmm-client/${PMM_CLIENT_VER}/binary/debian/buster/x86_64/pmm-client_${PMM_CLIENT_VER}-1.buster_amd64.deb && \ - dpkg -i pmm-client_${PMM_CLIENT_VER}-1.buster_amd64.deb && \ - rm pmm-client_${PMM_CLIENT_VER}-1.buster_amd64.deb && \ - apt-get purge wget ca-certificates -qq && \ - apt-get autoremove -qq && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Copy CA certs for https calls -COPY --from=k8s /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt diff --git a/docker/mini/orchestrator-up.sh b/docker/mini/orchestrator-up.sh deleted file mode 100755 index 6e4ff486fad..00000000000 --- a/docker/mini/orchestrator-up.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -source ./env.sh - -echo "- Configuring orchestrator with given topology server and credentials..." -cp /etc/orchestrator.conf.json /tmp/ -sed -i /tmp/orchestrator.conf.json -e "s/DISCOVERY_SEED_PLACEHOLDER/$TOPOLOGY_SERVER/g" -sed -i /tmp/orchestrator.conf.json -e "s/MYSQL_TOPOLOGY_USER_PLACEHOLDER/$TOPOLOGY_USER/g" -sed -i /tmp/orchestrator.conf.json -e "s/MYSQL_TOPOLOGY_PASSWORD_PLACEHOLDER/$TOPOLOGY_PASSWORD/g" - -cat /tmp/orchestrator.conf.json > /etc/orchestrator.conf.json -rm /tmp/orchestrator.conf.json - -ORCHESTRATOR_LOG="${VTDATAROOT}/tmp/orchestrator.out" - -echo "- Starting orchestrator... Logfile is $ORCHESTRATOR_LOG" - -cd /usr/local/orchestrator -./orchestrator http > $ORCHESTRATOR_LOG 2>&1 & diff --git a/docker/mini/orchestrator-vitess-mini.conf.json b/docker/mini/orchestrator-vitess-mini.conf.json deleted file mode 100644 index 604801603c2..00000000000 --- a/docker/mini/orchestrator-vitess-mini.conf.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "Debug": true, - "EnableSyslog": false, - "ListenAddress": ":3000", - "MySQLTopologyUser": "MYSQL_TOPOLOGY_USER_PLACEHOLDER", - "MySQLTopologyPassword": "MYSQL_TOPOLOGY_PASSWORD_PLACEHOLDER", - "BackendDB": "sqlite", - "SQLite3DataFile": "/tmp/orchestrator.sqlite3", - "MySQLConnectTimeoutSeconds": 1, - "DefaultInstancePort": 3306, - "DiscoverByShowSlaveHosts": true, - "InstancePollSeconds": 1, - "HostnameResolveMethod": "none", - "MySQLHostnameResolveMethod": "@@report_host", - "SkipBinlogServerUnresolveCheck": true, - "ExpiryHostnameResolvesMinutes": 60, - "VerifyReplicationFilters": false, - "ReasonableMaintenanceReplicationLagSeconds": 20, - "CandidateInstanceExpireMinutes": 60, - "ReadOnly": false, - "AuthenticationMethod": "", - "ReplicationLagQuery": "", - "DetectClusterAliasQuery": "", - "DetectClusterDomainQuery": "", - "DetectInstanceAliasQuery": "", - "DetectPromotionRuleQuery": "", - "DetectDataCenterQuery": "", - "DetectRegionQuery": "", - "DetectPhysicalEnvironmentQuery": "", - "DetectSemiSyncEnforcedQuery": "", - "DiscoverySeeds": [ - "DISCOVERY_SEED_PLACEHOLDER" - ], - "ServeAgentsHttp": false, - "UseSSL": false, - "UseMutualTLS": false, - "MySQLTopologyUseMixedTLS": false, - "StatusEndpoint": "/api/status", - "StatusSimpleHealth": true, - "StatusOUVerify": false, - "BinlogEventsChunkSize": 10000, - "SkipBinlogEventsContaining": [], - "ReduceReplicationAnalysisCount": false, - "FailureDetectionPeriodBlockMinutes": 5, - "FailMasterPromotionOnLagMinutes": 0, - "RecoveryPeriodBlockSeconds": 0, - "RecoveryIgnoreHostnameFilters": [], - "RecoverMasterClusterFilters": [], - "RecoverIntermediateMasterClusterFilters": [], - "OnFailureDetectionProcesses": [], - "PreFailoverProcesses": [], - "PostFailoverProcesses": [], - "PostUnsuccessfulFailoverProcesses": [], - "PostMasterFailoverProcesses": [], - "PostIntermediateMasterFailoverProcesses": [], - "CoMasterRecoveryMustPromoteOtherCoMaster": true, - "DetachLostReplicasAfterMasterFailover": true, - "ApplyMySQLPromotionAfterMasterFailover": true, - "PreventCrossDataCenterMasterFailover": false, - "PreventCrossRegionMasterFailover": true, - "MasterFailoverDetachReplicaMasterHost": false, - "MasterFailoverLostInstancesDowntimeMinutes": 0, - "PostponeReplicaRecoveryOnLagMinutes": 0, - "RaftEnabled": false -} diff --git a/docker/orchestrator/Dockerfile b/docker/orchestrator/Dockerfile deleted file mode 100644 index 13622322443..00000000000 --- a/docker/orchestrator/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM debian:jessie - -# Install Percona XtraDB Cluster (Galera) -RUN apt-key adv --keyserver keys.gnupg.net --recv-keys 9334A25F8507EFA5 && \ - echo 'deb http://repo.percona.com/apt jessie main' > /etc/apt/sources.list.d/mysql.list && \ - apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - percona-xtradb-cluster-server-5.6 && \ - rm -rf /var/lib/apt/lists/* - -# Set up Orchestrator database -RUN service mysql start && \ - mysql -e "CREATE DATABASE orchestrator; GRANT ALL PRIVILEGES ON orchestrator.* TO 'orc_server_user'@'127.0.0.1' IDENTIFIED BY 'orc_server_user_password'" && \ - service mysql stop - -# Copy Orchestrator files (placed in workdir by build.sh) -COPY vtctlclient /usr/bin/vtctlclient -COPY orchestrator /usr/bin/orchestrator -COPY orchestrator.conf.json /orc/conf/orchestrator.conf.json -COPY resources /orc/resources - -WORKDIR /orc -CMD ["/usr/bin/orchestrator", "http"] - diff --git a/docker/orchestrator/build.sh b/docker/orchestrator/build.sh deleted file mode 100755 index 45236582a12..00000000000 --- a/docker/orchestrator/build.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -e - -tmpdir=`mktemp -d` - -script="go install vitess.io/vitess/go/cmd/vtctlclient@latest && \ - git clone https://github.com/openark/orchestrator.git src/github.com/openark/orchestrator && \ - go install github.com/openark/orchestrator/go/cmd/orchestrator" - -echo "Building orchestrator..." -docker run -ti --name=vt_orc_build golang:1.14.4-buster bash -c "$script" -docker cp vt_orc_build:/go/bin/orchestrator $tmpdir -docker cp vt_orc_build:/go/bin/vtctlclient $tmpdir -docker cp vt_orc_build:/go/src/github.com/openark/orchestrator/resources $tmpdir -docker rm vt_orc_build - -echo "Building Docker image..." -cp Dockerfile orchestrator.conf.json $tmpdir -(cd $tmpdir && docker build -t vitess/orchestrator .) - -# Clean up -rm -r $tmpdir diff --git a/docker/orchestrator/orchestrator.conf.json b/docker/orchestrator/orchestrator.conf.json deleted file mode 100644 index 729594044ed..00000000000 --- a/docker/orchestrator/orchestrator.conf.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "ActiveNodeExpireSeconds": 5, - "ApplyMySQLPromotionAfterMasterFailover": true, - "AuditLogFile": "/tmp/orchestrator-audit.log", - "AuditToSyslog": false, - "AuthenticationMethod": "", - "AuthUserHeader": "", - "BackendDB": "sqlite", - "BinlogEventsChunkSize": 10000, - "CandidateInstanceExpireMinutes": 60, - "CoMasterRecoveryMustPromoteOtherCoMaster": false, - "DataCenterPattern": "[.]([^.]+)[.][^.]+[.]vitess[.]io", - "Debug": true, - "DefaultInstancePort": 3306, - "DetachLostSlavesAfterMasterFailover": true, - "DetectClusterAliasQuery": "SELECT value FROM _vt.local_metadata WHERE name='ClusterAlias'", - "DetectClusterDomainQuery": "", - "DetectInstanceAliasQuery": "SELECT value FROM _vt.local_metadata WHERE name='Alias'", - "DetectPromotionRuleQuery": "SELECT value FROM _vt.local_metadata WHERE name='PromotionRule'", - "DetectDataCenterQuery": "SELECT value FROM _vt.local_metadata WHERE name='DataCenter'", - "DetectSemiSyncEnforcedQuery": "SELECT @@global.rpl_semi_sync_master_wait_no_slave AND @@global.rpl_semi_sync_master_timeout > 1000000", - "DiscoverByShowSlaveHosts": false, - "EnableSyslog": false, - "ExpiryHostnameResolvesMinutes": 60, - "DelayMasterPromotionIfSQLThreadNotUpToDate": true, - "FailureDetectionPeriodBlockMinutes": 10, - "GraphiteAddr": "", - "GraphiteConvertHostnameDotsToUnderscores": true, - "GraphitePath": "", - "HostnameResolveMethod": "none", - "HTTPAuthPassword": "", - "HTTPAuthUser": "", - "InstanceBulkOperationsWaitTimeoutSeconds": 10, - "InstancePollSeconds": 5, - "ListenAddress": ":3000", - "MasterFailoverLostInstancesDowntimeMinutes": 0, - "MySQLConnectTimeoutSeconds": 1, - "MySQLHostnameResolveMethod": "none", - "MySQLTopologyCredentialsConfigFile": "", - "MySQLTopologyMaxPoolConnections": 3, - "MySQLTopologyPassword": "orc_client_user_password", - "MySQLTopologyReadTimeoutSeconds": 3, - "MySQLTopologySSLCAFile": "", - "MySQLTopologySSLCertFile": "", - "MySQLTopologySSLPrivateKeyFile": "", - "MySQLTopologySSLSkipVerify": true, - "MySQLTopologyUseMutualTLS": false, - "MySQLTopologyUser": "orc_client_user", - "OnFailureDetectionProcesses": [ - "echo 'Detected {failureType} on {failureCluster}. Affected replicas: {countSlaves}' >> /tmp/recovery.log" - ], - "OSCIgnoreHostnameFilters": [ - ], - "PhysicalEnvironmentPattern": "[.]([^.]+[.][^.]+)[.]vitess[.]io", - "PostFailoverProcesses": [ - "echo '(for all types) Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Successor: {successorHost}:{successorPort}' >> /tmp/recovery.log" - ], - "PostIntermediateMasterFailoverProcesses": [ - "echo 'Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Successor: {successorHost}:{successorPort}' >> /tmp/recovery.log" - ], - "PostMasterFailoverProcesses": [ - "echo 'Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Promoted: {successorHost}:{successorPort}' >> /tmp/recovery.log", - "n=0; until [ $n -ge 10 ]; do vtctlclient -server vtctld:15999 TabletExternallyReparented {successorAlias} && break; n=$[$n+1]; sleep 5; done" - ], - "PostponeSlaveRecoveryOnLagMinutes": 0, - "PostUnsuccessfulFailoverProcesses": [ - ], - "PowerAuthUsers": [ - "*" - ], - "PreFailoverProcesses": [ - "echo 'Will recover from {failureType} on {failureCluster}' >> /tmp/recovery.log" - ], - "ProblemIgnoreHostnameFilters": [ - ], - "PromotionIgnoreHostnameFilters": [ - ], - "ReadLongRunningQueries": false, - "ReadOnly": false, - "ReasonableMaintenanceReplicationLagSeconds": 20, - "ReasonableReplicationLagSeconds": 10, - "RecoverMasterClusterFilters": [ - ".*" - ], - "RecoveryIgnoreHostnameFilters": [ - ], - "RecoveryPeriodBlockSeconds": 60, - "ReduceReplicationAnalysisCount": true, - "RejectHostnameResolvePattern": "", - "RemoveTextFromHostnameDisplay": ".vitess.io:3306", - "ReplicationLagQuery": "", - "ServeAgentsHttp": false, - "SkipBinlogEventsContaining": [ - ], - "SkipBinlogServerUnresolveCheck": true, - "SkipOrchestratorDatabaseUpdate": false, - "SlaveStartPostWaitMilliseconds": 1000, - "SnapshotTopologiesIntervalHours": 0, - "SQLite3DataFile": ":memory:", - "SSLCAFile": "", - "SSLCertFile": "", - "SSLPrivateKeyFile": "", - "SSLSkipVerify": false, - "SSLValidOUs": [ - ], - "StaleSeedFailMinutes": 60, - "StatusEndpoint": "/api/status", - "StatusOUVerify": false, - "UnseenAgentForgetHours": 6, - "UnseenInstanceForgetHours": 240, - "UseMutualTLS": false, - "UseSSL": false, - "VerifyReplicationFilters": false -}