Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add Kopia Repository Server based kando Blueprint for MySQL Application #1981

Open
wants to merge 46 commits into
base: master
Choose a base branch
from

Conversation

r4rajat
Copy link
Contributor

@r4rajat r4rajat commented Mar 31, 2023

Change Overview

Add Kopia Repository Server based Blueprint for MySQL Application

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • fixes #issue-number

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

Testing

1) Installing the Chart

To install the MySQL database using the bitnami chart with the release name mysql-release:

# Add bitnami in your local chart repository
$ helm repo add bitnami https://charts.bitnami.com/bitnami
# Update your local chart repository
$ helm repo update
# Install the MySQL database
$ helm install mysql-release bitnami/mysql \
  --namespace mysql \
  --create-namespace \
  --set auth.rootPassword='<mysql-root-password>'

2) Installing Kanister

helm install kanister ./helm/kanister-operator \
--namespace kanister \
--set image.repository=r4rajat/controller \
--set image.tag=v17 \
--set repositoryServerControllerImage.registry=r4rajat \
--set repositoryServerControllerImage.name=repo-server-controller \
--set repositoryServerControllerImage.tag=v17 \
--set controller.parallelism=10 \
--set repositoryServerController.enabled=true \
--create-namespace

3) Setting up Repository Server

4) Applying Blueprint

kubectl create -f ./mysql-blueprint.yaml -n kanister

5) Take Backup, Restore and Delete

kanctl create actionset --action backup --namespace kanister --blueprint mysql-blueprint --statefulset mysql/mysql-release --secrets mysql=mysql/mysql-release --repository-server=kanister/kopia-repo-server-1
actionset backup-rslmb created


kanctl --namespace kanister create actionset --action restore --from "backup-rslmb"
Warning: Neither --profile nor --repository-server flag is provided.
Action might fail if blueprint is using these resources.
actionset restore-backup-rslmb-2hdsz created


kanctl --namespace kanister create actionset --action delete --from backup-rslmb --namespacetargets kanister
Warning: Neither --profile nor --repository-server flag is provided.
Action might fail if blueprint is using these resources.
actionset delete-backup-rslmb-cq6bw created

Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
@github-actions
Copy link
Contributor

Thanks for submitting this pull request 🎉. The team will review it soon and get back to you.

If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document.

Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
r4rajat and others added 5 commits March 31, 2023 21:39
Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
@r4rajat r4rajat marked this pull request as draft May 4, 2023 17:56
@r4rajat r4rajat marked this pull request as ready for review June 2, 2023 06:34
@r4rajat r4rajat requested a review from pavannd1 June 19, 2023 13:54
Copy link
Contributor

@viveksinghggits viveksinghggits left a comment

Choose a reason for hiding this comment

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

LGTM 👏

examples/mysql-kopia-repository-server/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@kale-amruta kale-amruta left a comment

Choose a reason for hiding this comment

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

I have added few comments

name: '{{ index .Object.metadata.labels "app.kubernetes.io/instance" }}'
namespace: '{{ .StatefulSet.Namespace }}'
args:
image: ghcr.io/kanisterio/mysql-sidecar:0.93.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the latest tag for this image?

name: s3-location
namespace: kanister
labels:
repo.kanister.io/target-namespace: monitoring
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets remove this label, since its currently not used

name: s3-creds
namespace: kanister
labels:
repo.kanister.io/target-namespace: monitoring
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets remove this label, since its currently not used

aws_access_key_id: <base64_encoded_aws_access_key>
# required: base64 encoded value for the secret corresponding to the key above
aws_secret_access_key: <base64_encoded_aws_secret_access_key>
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets mention here that we should use same s3 credentials that were used while creating the kopia repository

Comment on lines +124 to +129
# optional: if set to true, do not verify SSL cert.
# Default, when omitted, is false
#skipSSLVerify: false
# required: if type is `file-store`
# optional, otherwise
#claimName: store-pvc
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove these commented fields altogether since these are not required in this example

Copy link
Contributor

This PR is marked as stale due to inactivity. Add a new comment to reactivate it.

@github-actions github-actions bot added the stale label Dec 15, 2023
@viveksinghggits
Copy link
Contributor

@r4rajat

@github-actions github-actions bot removed the stale label Dec 16, 2023
Copy link
Contributor

This PR is marked as stale due to inactivity. Add a new comment to reactivate it.

@github-actions github-actions bot added the stale label Mar 15, 2024
@pavannd1 pavannd1 added frozen and removed stale labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants