-
Bug
-
Resolution: Done
-
Normal
-
None
-
None
Description of problem:
Follow the steps in document How to back up and restore a Quay deployment to migrate quay 3.7.0 from standalone vm to OCP 4.10 cluster, found some issues.
The test environment:
- standalone environment
registry.redhat.io/quay/quay-rhel8:v3.7.0 registry.redhat.io/rhel8/redis-5:1 registry.redhat.io/rhel8/postgresql-10:1 aws s3 bucket
the config.yaml in standalone
AUTHENTICATION_TYPE: Database AVATAR_KIND: local BUILDLOGS_REDIS: host: whuvm.eastus.cloudapp.azure.com password: r... port: 6379 DATABASE_SECRET_KEY: 0624d6f3-75c0-4a63-bded-0a534aa66d57 DB_CONNECTION_ARGS: {} DB_URI: postgresql://qu..er:q..ss@whuvm.eastus.cloudapp.azure.com:5432/quay DEFAULT_TAG_EXPIRATION: 2w DISTRIBUTED_STORAGE_CONFIG: default: - S3Storage - s3_bucket: whuaws storage_path: /quaydata s3_access_key: A...UP s3_secret_key: c.....V4 host: s3.us-east-2.amazonaws.com DISTRIBUTED_STORAGE_DEFAULT_LOCATIONS: [] DISTRIBUTED_STORAGE_PREFERENCE: - default FEATURE_ACI_CONVERSION: false FEATURE_ACTION_LOG_ROTATION: false FEATURE_ANONYMOUS_ACCESS: true FEATURE_APP_REGISTRY: false FEATURE_APP_SPECIFIC_TOKENS: true FEATURE_BITBUCKET_BUILD: false FEATURE_BLACKLISTED_EMAILS: false FEATURE_BUILD_SUPPORT: false FEATURE_CHANGE_TAG_EXPIRATION: true FEATURE_DIRECT_LOGIN: true FEATURE_EXTENDED_REPOSITORY_NAMES: true FEATURE_FIPS: false FEATURE_GITHUB_BUILD: false FEATURE_GITHUB_LOGIN: false FEATURE_GITLAB_BUILD: false FEATURE_GOOGLE_LOGIN: false FEATURE_INVITE_ONLY_USER_CREATION: false FEATURE_MAILING: false FEATURE_NONSUPERUSER_TEAM_SYNCING_SETUP: false FEATURE_PARTIAL_USER_AUTOCOMPLETE: true FEATURE_PROXY_STORAGE: false FEATURE_REPO_MIRROR: false FEATURE_REQUIRE_TEAM_INVITE: true FEATURE_RESTRICTED_V1_PUSH: true FEATURE_SECURITY_NOTIFICATIONS: false FEATURE_SECURITY_SCANNER: false FEATURE_STORAGE_REPLICATION: false FEATURE_TEAM_SYNCING: false FEATURE_USER_CREATION: true FEATURE_USER_LAST_ACCESSED: true FEATURE_USER_LOG_ACCESS: false FEATURE_USER_METADATA: false FEATURE_USER_RENAME: false FEATURE_USERNAME_CONFIRMATION: true FRESH_LOGIN_TIMEOUT: 10m GITHUB_LOGIN_CONFIG: {} GITHUB_TRIGGER_CONFIG: {} GITLAB_TRIGGER_KIND: {} LDAP_ALLOW_INSECURE_FALLBACK: false LDAP_EMAIL_ATTR: mail LDAP_UID_ATTR: uid LDAP_URI: ldap://localhost LOG_ARCHIVE_LOCATION: default LOGS_MODEL: database LOGS_MODEL_CONFIG: {} MAIL_DEFAULT_SENDER: support@quay.io MAIL_PORT: 587 MAIL_USE_AUTH: false MAIL_USE_TLS: false PREFERRED_URL_SCHEME: http REGISTRY_TITLE: whuquay REGISTRY_TITLE_SHORT: whuquay REPO_MIRROR_INTERVAL: 30 REPO_MIRROR_TLS_VERIFY: true SEARCH_MAX_RESULT_PAGE_COUNT: 10 SEARCH_RESULTS_PER_PAGE: 10 SECRET_KEY: 4460d6a3-965f-45de-af28-7c228a15589f SECURITY_SCANNER_INDEXING_INTERVAL: 30 SERVER_HOSTNAME: whuvm.eastus.cloudapp.azure.com SETUP_COMPLETE: true TAG_EXPIRATION_OPTIONS: - 0s - 1d - 1w - 2w - 4w TEAM_RESYNC_STALE_TIME: 30m TESTING: false USE_CDN: false USER_EVENTS_REDIS: host: whuvm.eastus.cloudapp.azure.com password: r.... port: 6379 USER_RECOVERY_TOKEN_LIFETIME: 30m USERFILES_LOCATION: default
- ocp 4.10 environment
registry.redhat.io/quay/quay-operator-rhel8@sha256:105be0f9237a6aeca8b885cbc6d0fa417edc5684746ae7e6b2c985e72a2c7239
QuayRegistry definition:
apiVersion: quay.redhat.com/v1 kind: QuayRegistry metadata: name: quayregistry namespace: quay-enterprise spec: configBundleSecret: config-bundle-secret components: - kind: clair managed: true - kind: postgres managed: true - kind: objectstorage managed: true - kind: redis managed: true - kind: horizontalpodautoscaler managed: true - kind: route managed: true - kind: mirror managed: true - kind: monitoring managed: false
config.yaml
SUPER_USERS: - whuquay
The issues:
1. The pg_dump command in step 2 should include port attribute
# pg_dump -h whuvm.eastus.cloudapp.azure.com -p 5432 -d quay -U quayuser -W -O > /root/whu/quay_backup/quay-database-backup.sql
2. the "oc cp" command is not correct in oc 4.10. when oc client version is 4.10, the command should be
oc cp /root/whu/quay_backup/quay-database-backup.sql quay-enterprise/quayregistry-quay-database-54956cdd54-p7b2w:/var/lib/pgsql/data/userdata
3. in step 16, need to run below two additional steps, otherwise, the quay pods and mirror pods won't be reconciled.
$ oc scale --replicas=1 deployment quayregistry-quay-app deployment.apps/quayregistry-quay-app scaled $ oc scale --replicas=1 deployment quayregistry-quay-mirror deployment.apps/quayregistry-quay-mirror scaled
4. there is no step to describe how to migrate redis data.
- is related to
-
PROJQUAY-2762 Document how users move from a VMs to operator-based Quay deployments
- Closed