Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve the dry run experience and add support for execution from specified step #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sergenyalcin
Copy link
Member

@sergenyalcin sergenyalcin commented Jul 20, 2023

Description of your changes

Depends on: crossplane/upjet#235

This PR adds

  • Names and descriptions of steps to the instruction list.
  • Loading plan from a specified step.
  • Cache mechanism

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

1. backup-managed-resources: Backing up Managed Resources
$ sh -c "kubectl get managed -o yaml > backup/managed-resources.yaml" 

2. backup-composite-resources: Backing up Composite Resources
$ sh -c "kubectl get composite -o yaml > backup/composite-resources.yaml" 

3. backup-claim-resources: Backing up Claims
$ sh -c "kubectl get claim --all-namespaces -o yaml > backup/claim-resources.yaml" 

4. new-ssop: Installing the new family provider
$ kubectl apply -f new-ssop/upbound-provider-family-gcp.providers.pkg.crossplane.io_v1.yaml 

5. wait-for-healthy: Checking health of new family provider
$ sh -c "kubectl wait provider.pkg upbound-provider-family-gcp --for condition=Healthy" 

6. new-ssop: Installing the new service scoped providers
$ kubectl apply -f new-ssop/upbound-provider-gcp-container.providers.pkg.crossplane.io_v1.yaml 
$ kubectl apply -f new-ssop/upbound-provider-gcp-compute.providers.pkg.crossplane.io_v1.yaml 
$ kubectl apply -f new-ssop/upbound-provider-gcp-servicenetworking.providers.pkg.crossplane.io_v1.yaml 
$ kubectl apply -f new-ssop/upbound-provider-gcp-cloudplatform.providers.pkg.crossplane.io_v1.yaml 
$ kubectl apply -f new-ssop/upbound-provider-gcp-sql.providers.pkg.crossplane.io_v1.yaml 

7. wait-for-healthy: Checking health of new service scoped provider
$ sh -c "kubectl wait provider.pkg upbound-provider-gcp-container --for condition=Healthy" 

8. wait-for-healthy: Checking health of new service scoped provider
$ sh -c "kubectl wait provider.pkg upbound-provider-gcp-compute --for condition=Healthy" 

9. wait-for-healthy: Checking health of new service scoped provider
$ sh -c "kubectl wait provider.pkg upbound-provider-gcp-servicenetworking --for condition=Healthy" 

10. wait-for-healthy: Checking health of new service scoped provider
$ sh -c "kubectl wait provider.pkg upbound-provider-gcp-cloudplatform --for condition=Healthy" 

11. wait-for-healthy: Checking health of new service scoped provider
$ sh -c "kubectl wait provider.pkg upbound-provider-gcp-sql --for condition=Healthy" 

12. edit-package-lock: Deleting configuration package dependency from Lock resource
$ kubectl patch --type='merge' -f edit-package-lock/lock.locks.pkg.crossplane.io_v1beta1.yaml --patch-file edit-package-lock/lock.locks.pkg.crossplane.io_v1beta1.yaml 

13. delete-monolithic-provider: Deleting monolithic provider
$ kubectl delete Provider.pkg.crossplane.io upbound-provider-gcp 

14. activate-ssop: Activating the new family provider after deletion monolithic one
$ kubectl patch --type='merge' -f activate-ssop/upbound-provider-family-gcp.providers.pkg.crossplane.io_v1.yaml --patch-file activate-ssop/upbound-provider-family-gcp.providers.pkg.crossplane.io_v1.yaml 

15. wait-for-installed: Checking installation of new family provider
$ sh -c "kubectl wait provider.pkg upbound-provider-family-gcp --for condition=Installed" 

16. activate-ssop: Activating the new service scoped providers
$ kubectl patch --type='merge' -f activate-ssop/upbound-provider-gcp-container.providers.pkg.crossplane.io_v1.yaml --patch-file activate-ssop/upbound-provider-gcp-container.providers.pkg.crossplane.io_v1.yaml 
$ kubectl patch --type='merge' -f activate-ssop/upbound-provider-gcp-compute.providers.pkg.crossplane.io_v1.yaml --patch-file activate-ssop/upbound-provider-gcp-compute.providers.pkg.crossplane.io_v1.yaml 
$ kubectl patch --type='merge' -f activate-ssop/upbound-provider-gcp-servicenetworking.providers.pkg.crossplane.io_v1.yaml --patch-file activate-ssop/upbound-provider-gcp-servicenetworking.providers.pkg.crossplane.io_v1.yaml 
$ kubectl patch --type='merge' -f activate-ssop/upbound-provider-gcp-cloudplatform.providers.pkg.crossplane.io_v1.yaml --patch-file activate-ssop/upbound-provider-gcp-cloudplatform.providers.pkg.crossplane.io_v1.yaml 
$ kubectl patch --type='merge' -f activate-ssop/upbound-provider-gcp-sql.providers.pkg.crossplane.io_v1.yaml --patch-file activate-ssop/upbound-provider-gcp-sql.providers.pkg.crossplane.io_v1.yaml 

17. wait-for-installed: Checking installation of new service scoped provider
$ sh -c "kubectl wait provider.pkg upbound-provider-gcp-container --for condition=Installed" 

18. wait-for-installed: Checking installation of new service scoped provider
$ sh -c "kubectl wait provider.pkg upbound-provider-gcp-compute --for condition=Installed" 

19. wait-for-installed: Checking installation of new service scoped provider
$ sh -c "kubectl wait provider.pkg upbound-provider-gcp-servicenetworking --for condition=Installed" 

20. wait-for-installed: Checking installation of new service scoped provider
$ sh -c "kubectl wait provider.pkg upbound-provider-gcp-cloudplatform --for condition=Installed" 

21. wait-for-installed: Checking installation of new service scoped provider
$ sh -c "kubectl wait provider.pkg upbound-provider-gcp-sql --for condition=Installed" 

22. edit-configuration-metadata: Editing the Configuration Meta resource with new family provider references
$ sh -c "cp edit-configuration-metadata/platform-ref-gcp.configurations.meta.pkg.crossplane.io_v1alpha1.yaml /Users/sergenyalcin/workspace/upbound/platform-ref-gcp/package/crossplane.yaml" 

23. build-configuration: Building the new configuration pkg
$ sh -c "up xpkg build --package-root=/Users/sergenyalcin/workspace/upbound/platform-ref-gcp/package --examples-root=/Users/sergenyalcin/workspace/upbound/platform-ref-gcp/examples -o /tmp/generated/update-conf.pkg" 

24. push-configuration: Pushing the new configuration pkg
$ sh -c "up xpkg push index.docker.io/sergenyalcin10/platform-ref-gcp:v0.3.0-migrated -f /tmp/generated/update-conf.pkg" 

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
@sergenyalcin sergenyalcin requested a review from ulucinar as a code owner July 20, 2023 12:39
Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
@sergenyalcin sergenyalcin changed the title Improve the dry run experience Improve the dry run experience and add support for execution from specified step Jul 21, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant