---
title: Tanzu Application Platformの全パッケージのmanifestをダウンロードするTip
tags: ["Tanzu", "TAP"]
categories: ["Dev", "CaaS", "Kubernetes", "TAP"]
date: 2023-07-11T01:11:58Z
updated: 2023-07-11T01:12:25Z
---

Tanzu Application Platformのトラブルシュートやバージョンアップ時にどこが変わったのかをマニフェストレベルで知りたい時に役立つtip

以下のCLIを使用します。

* [`imgpkg`](https://carvel.dev/imgpkg/)
* [`jq`](https://jqlang.github.io/jq/)
* [`yj`](https://github.com/sclevine/yj)

以下のコマンドで`~/tap-manifests`以下にマニフェストをダウンロードします。`TAP_VERSION`は対象のTAPバージョンを指定してください。

```
TAP_VERSION=1.5.2
imgpkg pull -b registry.tanzu.vmware.com/tanzu-application-platform/tap-packages:${TAP_VERSION} -o ~/tap-manifests/${TAP_VERSION}/tap-packages

for pkg in $(cat ~/tap-manifests/${TAP_VERSION}/tap-packages/.imgpkg/images.yml | yj -yj | jq -r '.images[] | [.annotations."kbld.carvel.dev/id", .image] | @csv' | tr -d '"');do
  PKG_NAME=$(echo $pkg | awk -F ',' '{print $1}' | awk -F '@' '{print $1}' | sed 's|dev.registry.tanzu.vmware.com/||' | sed 's|/|_|g')
  PKG_BUNDLE=$(echo $pkg | awk -F ',' '{print $2}')
  imgpkg pull -b ${PKG_BUNDLE} -o ~/tap-manifests/${TAP_VERSION}/${PKG_NAME}
done
```

以下のようなディレクトリに各パッケージにマニフェストが配置されます。


```
$ tree ~/tap-manifests/1.5.2 -L 1
/Users/toshiaki/tap-manifests/1.5.2
|-- app-accelerator_acc-install-bundle
|-- developer-conventions_developer-conventions-bundle
|-- learning-center_learning-center-package
|-- learning-center_workshops-package
|-- ootb-delivery-basic_ootb-delivery-basic
|-- ootb-supply-chain-basic_ootb-supply-chain-basic
|-- ootb-supply-chain-testing-scanning_ootb-supply-chain-testing-scanning
|-- ootb-supply-chain-testing_ootb-supply-chain-testing
|-- ootb-templates_ootb-templates
|-- serverless_contour-pkg
|-- service-bindings-for-kubernetes_service-bindings-bundle
|-- tanzu-application-platform_constellation_api-portal.tanzu.vmware.com
|-- tanzu-application-platform_constellation_apis.apps.tanzu.vmware.com
|-- tanzu-application-platform_constellation_apiserver.appliveview.tanzu.vmware.com
|-- tanzu-application-platform_constellation_application-configuration-service.tanzu.vmware.com
|-- tanzu-application-platform_constellation_backend.appliveview.tanzu.vmware.com
|-- tanzu-application-platform_constellation_bitnami.services.tanzu.vmware.com
|-- tanzu-application-platform_constellation_buildservice.tanzu.vmware.com
|-- tanzu-application-platform_constellation_cartographer.tanzu.vmware.com
|-- tanzu-application-platform_constellation_cert-manager.tanzu.vmware.com
|-- tanzu-application-platform_constellation_cnrs.tanzu.vmware.com
|-- tanzu-application-platform_constellation_connector.appliveview.tanzu.vmware.com
|-- tanzu-application-platform_constellation_controller.source.apps.tanzu.vmware.com
|-- tanzu-application-platform_constellation_conventions.appliveview.tanzu.vmware.com
|-- tanzu-application-platform_constellation_crossplane.tanzu.vmware.com
|-- tanzu-application-platform_constellation_eventing.tanzu.vmware.com
|-- tanzu-application-platform_constellation_external-secrets.apps.tanzu.vmware.com
|-- tanzu-application-platform_constellation_fluxcd.source.controller.tanzu.vmware.com
|-- tanzu-application-platform_constellation_grype.scanning.apps.tanzu.vmware.com
|-- tanzu-application-platform_constellation_metadata-store.apps.tanzu.vmware.com
|-- tanzu-application-platform_constellation_namespace-provisioner.apps.tanzu.vmware.com
|-- tanzu-application-platform_constellation_policy.apps.tanzu.vmware.com
|-- tanzu-application-platform_constellation_scanning.apps.tanzu.vmware.com
|-- tanzu-application-platform_constellation_services-toolkit.tanzu.vmware.com
|-- tanzu-application-platform_constellation_snyk.scanning.apps.tanzu.vmware.com
|-- tanzu-application-platform_constellation_spring-boot-conventions.tanzu.vmware.com
|-- tanzu-application-platform_constellation_spring-cloud-gateway.tanzu.vmware.com
|-- tanzu-application-platform_constellation_sso.apps.tanzu.vmware.com
|-- tanzu-application-platform_constellation_tap-gui.tanzu.vmware.com
|-- tanzu-application-platform_constellation_tap-telemetry.tanzu.vmware.com
|-- tanzu-application-platform_constellation_tekton.tanzu.vmware.com
|-- tanzu-application-platform_tap
|-- tap-auth_tap-auth-bundle
|-- tap-packages
|-- vse-dev_app-scanning-bundle
`-- vse-dev_carbonblack-scanner
```



IDEなどで`~/tap-manifests/`を開いてバージョン間の差分を見ると、更新内容が分かりやすいです。

<img width="1024" alt="image" src="https://github.com/making/blog.ik.am/assets/106908/a545296c-78e4-4a1b-a3b4-a75c3d571ffe">

<!--
TMC_VERSION=1.0.0
imgpkg pull -b harbor.172-19-255-210.sslip.io/tanzumc/package-repository:${TMC_VERSION} -o ~/tmc/${TMC_VERSION}/tmc-packages

for pkg in $(cat ~/tmc/${TMC_VERSION}/tmc-packages/.imgpkg/images.yml | yj -yj | jq -r '.images[] | [.annotations."kbld.carvel.dev/id", .image] | @csv' | tr -d '"');do
  PKG_NAME=$(echo $pkg | awk -F ',' '{print $1}' | sed 's|702834246803.dkr.ecr.us-west-2.amazonaws.com/||' | sed 's|/|_|g' | sed 's|@|_|g' | sed 's|:|_|g')
  PKG_BUNDLE=$(echo $pkg | awk -F ',' '{print $2}')
  imgpkg pull -b ${PKG_BUNDLE} -o ~/tmc/${TMC_VERSION}/${PKG_NAME}
done
-->
