Skip to content

Commit

Permalink
POC: remove migration using clowdjob
Browse files Browse the repository at this point in the history
  • Loading branch information
psegedy committed Dec 5, 2023
1 parent 3cf8af0 commit b5132b9
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 368 deletions.
32 changes: 0 additions & 32 deletions deploy/clowdapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -483,38 +483,6 @@ objects:
- {name: DELETE_UNUSED_DATA_LIMIT, value: '${DELETE_UNUSED_DATA_LIMIT}'}
- {name: ENABLE_UNUSED_DATA_DELETE, value: '${ENABLE_UNUSED_DATA_DELETE}'}

- name: migrate-system-package-data
activeDeadlineSeconds: ${{JOBS_TIMEOUT}}
disabled: ${{MIGRATE_SYSTEM_PACKAGE_DISABLED}}
concurrencyPolicy: Forbid
completions: 1
podSpec:
image: ${IMAGE}:${IMAGE_TAG_JOBS}
initContainers:
- name: check-for-db
image: ${IMAGE}:${IMAGE_TAG_DATABASE_ADMIN}
command:
- ./database_admin/check-upgraded.sh
env:
- {name: SCHEMA_MIGRATION, value: '${SCHEMA_MIGRATION}'}
command:
- ./scripts/entrypoint.sh
- job
- system_package_data_migration
env:
- {name: LOG_LEVEL, value: '${LOG_LEVEL_JOBS}'}
- {name: GIN_MODE, value: '${GIN_MODE}'}
- {name: DB_DEBUG, value: '${DB_DEBUG_JOBS}'}
- {name: DB_USER, value: vmaas_sync}
- {name: DB_PASSWD, valueFrom: {secretKeyRef: {name: patchman-engine-database-passwords,
key: vmaas-sync-database-password}}}
- {name: PACKAGE_CACHE_SIZE, value: '${PACKAGE_CACHE_SIZE}'}
- {name: PACKAGE_NAME_CACHE_SIZE, value: '${PACKAGE_NAME_CACHE_SIZE}'}
- {name: MAX_GOROUTINES, value: '${POC_MIGRATION_MAX_GOROUTINES}'}
resources:
limits: {cpu: '${RES_LIMIT_CPU_MIGRATE_JOB}', memory: '${RES_LIMIT_MEM_MIGRATE_JOB}'}
requests: {cpu: '${RES_REQUEST_CPU_MIGRATE_JOB}', memory: '${RES_REQUEST_MEM_MIGRATE_JOB}'}

database:
name: patchman
version: 12
Expand Down
18 changes: 0 additions & 18 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,6 @@ services:
security_opt:
- label=disable

migrate_system_package2:
container_name: migrate_system_package2
image: patchman-engine-app
env_file:
- ./conf/common.env
- ./conf/admin_api.env
command: ./dev/scripts/docker-compose-entrypoint.sh job system_package_data_migration
depends_on:
- db
- patchimg
- db_feed
volumes:
- ./dev:/go/src/app/dev
- ./dev/database/secrets:/opt/postgresql
- ./dev/kafka/secrets:/opt/kafka
security_opt:
- label=disable

kafka:
container_name: kafka
build:
Expand Down
17 changes: 0 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,6 @@ services:
security_opt:
- label=disable

migrate_system_package2:
container_name: migrate_system_package2
image: patchman-engine-app
env_file:
- ./conf/common.env
- ./conf/gorun.env
- ./conf/admin_api.env
command: ./dev/scripts/docker-compose-entrypoint.sh job system_package_data_migration
depends_on:
- db
- patchimg
- db_feed
volumes:
- ./:/go/src/app
security_opt:
- label=disable

kafka:
container_name: kafka
build:
Expand Down
3 changes: 0 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"app/platform"
"app/tasks/caches"
"app/tasks/cleaning"
"app/tasks/migration"
"app/tasks/system_culling"
"app/tasks/vmaas_sync"
"app/turnpike"
Expand Down Expand Up @@ -71,7 +70,5 @@ func runJob(name string) {
cleaning.RunDeleteUnusedData()
case "packages_cache_refresh":
caches.RunPackageRefresh()
case "system_package_data_migration":
migration.RunSystemPackageDataMigration()
}
}
Loading

0 comments on commit b5132b9

Please sign in to comment.