2.8. 3scale 이미지 업그레이드
amp-system
이미지 스트림을 패치합니다.oc patch imagestream/amp-system --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP system 2.6"}, "from": { "kind": "DockerImage", "name": "registry.redhat.io/3scale-amp26/system"}, "name": "2.6", "referencePolicy": {"type": "Source"}}}]' oc patch imagestream/amp-system --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP system (latest)"}, "from": { "kind": "ImageStreamTag", "name": "2.6"}, "name": "latest", "referencePolicy": {"type": "Source"}}}]'
$ oc patch imagestream/amp-system --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP system 2.6"}, "from": { "kind": "DockerImage", "name": "registry.redhat.io/3scale-amp26/system"}, "name": "2.6", "referencePolicy": {"type": "Source"}}}]' $ oc patch imagestream/amp-system --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP system (latest)"}, "from": { "kind": "ImageStreamTag", "name": "2.6"}, "name": "latest", "referencePolicy": {"type": "Source"}}}]'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이는
system-app, system-
sphinx및
DeploymentConfigs의 재배포를 트리거합니다. 재배포될 때까지 기다린 후 해당 새 포드가 준비되고 이전 Pod가 종료될 때까지 기다립니다.system-
sidekiq참고Oracle Database를 사용하는 경우 Oracle Database와 함께 3scale 시스템 이미지의 지침에 따라 위의 지침을 실행한 후 시스템 이미지를 다시 빌드해야 합니다. https://access.redhat.com/documentation/en-us/red_hat_3scale_api_management/2.6/html/installing_3scale/system-oracle-support
amp-apicast
이미지 스트림을 패치합니다.oc patch imagestream/amp-apicast --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP APIcast 2.6"}, "from": { "kind": "DockerImage", "name": "registry.redhat.io/3scale-amp26/apicast-gateway"}, "name": "2.6", "referencePolicy": {"type": "Source"}}}]' oc patch imagestream/amp-apicast --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP APIcast (latest)"}, "from": { "kind": "ImageStreamTag", "name": "2.6"}, "name": "latest", "referencePolicy": {"type": "Source"}}}]'
$ oc patch imagestream/amp-apicast --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP APIcast 2.6"}, "from": { "kind": "DockerImage", "name": "registry.redhat.io/3scale-amp26/apicast-gateway"}, "name": "2.6", "referencePolicy": {"type": "Source"}}}]' $ oc patch imagestream/amp-apicast --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP APIcast (latest)"}, "from": { "kind": "ImageStreamTag", "name": "2.6"}, "name": "latest", "referencePolicy": {"type": "Source"}}}]'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이는
apicast-production 및
DeploymentConfigs의 재배포를 트리거합니다. 재배포될 때까지 기다린 후 해당 새 포드가 준비되고 이전 Pod가 종료될 때까지 기다립니다.apicast-
stagingamp-backend
이미지 스트림을 패치합니다.oc patch imagestream/amp-backend --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP Backend 2.6"}, "from": { "kind": "DockerImage", "name": "registry.redhat.io/3scale-amp26/backend"}, "name": "2.6", "referencePolicy": {"type": "Source"}}}]' oc patch imagestream/amp-backend --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP Backend (latest)"}, "from": { "kind": "ImageStreamTag", "name": "2.6"}, "name": "latest", "referencePolicy": {"type": "Source"}}}]'
$ oc patch imagestream/amp-backend --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP Backend 2.6"}, "from": { "kind": "DockerImage", "name": "registry.redhat.io/3scale-amp26/backend"}, "name": "2.6", "referencePolicy": {"type": "Source"}}}]' $ oc patch imagestream/amp-backend --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP Backend (latest)"}, "from": { "kind": "ImageStreamTag", "name": "2.6"}, "name": "latest", "referencePolicy": {"type": "Source"}}}]'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이렇게 하면
backend-listener, backend-
worker,
DeploymentConfigs의 재배포가 트리거됩니다. 재배포될 때까지 기다린 후 해당 새 포드가 준비되고 이전 Pod가 종료될 때까지 기다립니다.backend-
cronamp-zync
이미지 스트림을 패치합니다.oc patch imagestream/amp-zync --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP Zync 2.6"}, "from": { "kind": "DockerImage", "name": "registry.redhat.io/3scale-amp26/zync"}, "name": "2.6", "referencePolicy": {"type": "Source"}}}]' oc patch imagestream/amp-zync --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP Zync (latest)"}, "from": { "kind": "ImageStreamTag", "name": "2.6"}, "name": "latest", "referencePolicy": {"type": "Source"}}}]'
$ oc patch imagestream/amp-zync --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP Zync 2.6"}, "from": { "kind": "DockerImage", "name": "registry.redhat.io/3scale-amp26/zync"}, "name": "2.6", "referencePolicy": {"type": "Source"}}}]' $ oc patch imagestream/amp-zync --type=json -p '[{"op": "add", "path": "/spec/tags/-", "value": {"annotations": {"openshift.io/display-name": "AMP Zync (latest)"}, "from": { "kind": "ImageStreamTag", "name": "2.6"}, "name": "latest", "referencePolicy": {"type": "Source"}}}]'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
이렇게 하면
zync 및
DeploymentConfigs의 재배포가 트리거됩니다. 재배포될 때까지 기다린 후 해당 새 포드가 준비되고 이전 Pod가 종료될 때까지 기다립니다.zync
-que -
또한 이전 섹션에서 생성할 때 Error 상태이고 해당 Pod가 Ready 상태의 상태인 that
zync-que
가 표시됩니다.
-
이렇게 하면
표시되는 릴리스 버전을 업데이트합니다.
oc set env dc/system-app AMP_RELEASE=2.6
$ oc set env dc/system-app AMP_RELEASE=2.6
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 그러면
system-app
DeploymentConfig의 재배포가 트리거됩니다. 작업이 수행되고 해당 Pod가 준비되고 이전 Pod가 종료될 때까지 기다립니다.마지막으로 DeploymentConfigs의 모든 이미지 URL에 새 이미지 레지스트리 URL이 포함되어 있는지 확인할 수 있습니다(각 URL 끝에 해시가 추가됨).
THREESCALE_DC_NAMES="apicast-production apicast-staging apicast-wildcard-router backend-cron backend-listener backend-redis backend-worker system-app system-memcache system-mysql system-redis system-sidekiq system-sphinx zync zync-database"
$ THREESCALE_DC_NAMES="apicast-production apicast-staging apicast-wildcard-router backend-cron backend-listener backend-redis backend-worker system-app system-memcache system-mysql system-redis system-sidekiq system-sphinx zync zync-database" for component in ${THREESCALE_DC_NAMES}; do echo -n "${component} image: " && oc get dc $component -o json | jq .spec.template.spec.containers[0].image ; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow