Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Add migration tool, guide and add script to test if migration job from api-server to CRD is working #2710

Merged
merged 14 commits into from
Sep 27, 2019

Conversation

mszostok
Copy link
Contributor

@mszostok mszostok commented Sep 23, 2019

Description

Changes proposed in this pr:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 23, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mszostok

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 23, 2019
@jberkhahn
Copy link
Contributor

/retest

@jberkhahn
Copy link
Contributor

jberkhahn commented Sep 23, 2019

I think you actually broke some stuff in the instance controller in pkg/controller...

@mszostok
Copy link
Contributor Author

mszostok commented Sep 24, 2019

That’s true, there is sth wrong and I’m still working on it;)

But overall logic and documentation will not be changed

@mszostok mszostok added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 24, 2019
@mszostok mszostok removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 24, 2019
@mszostok
Copy link
Contributor Author

mszostok commented Sep 25, 2019

@piotrmiskiewicz @jberkhahn PTAL

about issue: I had to adjust test because here we also fixed repetitive updates on status entry. Here are changes which I applied ae2caca

@mszostok
Copy link
Contributor Author

mszostok commented Sep 25, 2019

Waiting for your reviews :) and also block tide merge. We will need to do that manually using the rebase and merge action to keep the commits history
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 25, 2019
@piotrmiskiewicz
Copy link
Contributor

/lgtm

This document describes how the migration works and what actions must be performed.

>**NOTE:**
Before starting the migration, make sure that you performed a full backup of your cluster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"you have performed"

layout: docwithnav
---

Service Catalog upgrade from version 0.2.x (and earlier) to 0.3.x needs a data migration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Upgrading Service Catalog from versions 0.2.x (and earlier) to 0.3.x requires a database migration."

![Service Catalog upgrade steps](images/sc-migration-to-crds-steps.svg)

The upgrade to CRDs consists of the following steps:
1. Make API Server read-only. Before any backup, we should block any resource changes to be sure the backup makes a snapshot. We need to avoid any changes when the migration tool is backuping resources.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"backing up resources"


## Upgrade Service Catalog manually

### Backup and deleting resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Backup and delete resources"

PLATFORM=darwin make build
```

Resulting executable file can be found in the `bin` subdirectory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The resulting"

@k8s-ci-robot k8s-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 26, 2019
@piotrmiskiewicz
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 26, 2019
@mszostok
Copy link
Contributor Author

@jberkhahn changes applied:)

there is also PR for adding CI for running migration tests: kubernetes/test-infra#14464.

It was executed on our infra: https://storage.googleapis.com/kyma-prow-logs/logs/post-test-sc-upgrade-job/1176903408213299200/build-log.txt. You can also execute it locally:

./contrib/hack/ci/run-migration-tests.sh

@jberkhahn
Copy link
Contributor

/lgtm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants