Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feedback#572

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lrochette merged 2 commits intomasterfromlr-1.4.0-feedback
Feb 16, 2023
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions_docs/administration/codefresh-on-prem-upgrade.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -477,12 +477,13 @@ From version **1.4.0 and higher**, we have deprecated support for the `Codefresh

Obtain the PostgresSQL administrator password:
```shell
export PGPASSWORD=$(kubectl get secret --namespace codefresh cf-postgresql -o jsonpath="{.data.postgres-password}" | base64 --decode)
NAMESPACE=codefresh
export PGPASSWORD=$(kubectl get secret --namespace $NAMESPACE cf-postgresql -o jsonpath="{.data.postgres-password}" | base64 --decode)
```

Forward the PostgreSQL service port and place the process in the background:
```shell
kubectl port-forward --namespacecodefresh svc/cf-postgresql 5432:5432 &
kubectl port-forward --namespace$NAMESPACE svc/cf-postgresql 5432:5432 &
```

Create a directory for the backup files and make it the current working directory:
Expand All@@ -503,18 +504,18 @@ Here, the *--net* parameter lets the Docker container use the host's network sta

Create an environment variable with the password for the new stateful set:
```shell
export PGPASSWORD=$(kubectl get secret --namespacecodefresh cf-postgresql -o jsonpath="{.data.postgres-password}" | base64 --decode)
export PGPASSWORD=$(kubectl get secret --namespace$NAMESPACE cf-postgresql -o jsonpath="{.data.postgres-password}" | base64 --decode)
```

Forward the PostgreSQL service port for the new stateful set and place the process in the background:
```shell
kubectl port-forward --namespacecodefresh svc/cf-postgresql 5432:5432
kubectl port-forward --namespace$NAMESPACE svc/cf-postgresql 5432:5432
```

Restore the contents of the backup into the new release using the *pg_restore* tool. If this tool is not available on your system, mount the directory containing the backup files as a volume in Bitnami's PostgreSQL Docker container and use the *pg_restore* client tool in the container image to import the backup into the new cluster, as shown below:
```shell
cd psqlbackup
docker run --rm --name postgresql-backup -e PGPASSWORD=$PGPASSWORD -v $(pwd):/app --net="host" bitnami/postgresql:13 pg_restore --Fc --create --dbname postgres -h host.docker.internal -p 5432 /app/audit.dump
docker run --rm --name postgresql-backup -e PGPASSWORD=$PGPASSWORD -v $(pwd):/app --net="host" bitnami/postgresql:13 pg_restore -Fc --create --dbname postgres -h host.docker.internal -p 5432 /app/audit.dump
```

##### Backup and restore via Helm hooks
Expand DownExpand Up@@ -553,12 +554,13 @@ From version **1.4.0 and higher**, we have deprecated support for the `Codefresh

Obtain the MongoDB administrator password:
```shell
export MONGODB_ROOT_PASSWORD=$(kubectl get secret --namespace codefresh cf-mongodb -o jsonpath="{.data.mongodb-root-password}" | base64 --decode)
NAMESPACE=codefresh
export MONGODB_ROOT_PASSWORD=$(kubectl get secret --namespace $NAMESPACE cf-mongodb -o jsonpath="{.data.mongodb-root-password}" | base64 --decode)
```

Forward the MongoDB service port and place the process in the background:
```shell
kubectl port-forward --namespacecodefresh svc/mongodb 27017:27017 &
kubectl port-forward --namespace$NAMESPACE svc/mongodb 27017:27017 &
```

Create a directory for the backup files and make it the current working directory:
Expand All@@ -579,14 +581,14 @@ Here, the *--net* parameter lets the Docker container use the host's network sta

Create an environment variable with the password for the new stateful set:
```shell
export MONGODB_ROOT_PASSWORD=$(kubectl get secret --namespacecodefresh cf-mongodb -o jsonpath="{.data.mongodb-root-password}" | base64 --decode)
export MONGODB_ROOT_PASSWORD=$(kubectl get secret --namespace$NAMESPACE cf-mongodb -o jsonpath="{.data.mongodb-root-password}" | base64 --decode)
```

Forward the MongoDB service port for the new stateful set and place the process in the background:

(**Note!** Default service address was changed)
```shell
kubectl port-forward --namespacecodefresh svc/cf-mongodb 27017:27017 &
kubectl port-forward --namespace$NAMESPACE svc/cf-mongodb 27017:27017 &
```

Restore the contents of the backup into the new release using the *mongorestore* tool. If this tool is not available on your system, mount the directory containing the backup files as a volume in Bitnami's MongoDB Docker container and use the *mongorestore* client tool in the container image to import the backup into the new cluster, as shown below:
Expand All@@ -599,7 +601,7 @@ Stop the service port forwarding by terminating the background process.

Connect to the new stateful set and confirm that your data has been successfully restored:
```shell
kubectl run --namespacecodefresh mongodb-new-client --rm --tty -i --restart='Never' --image docker.io/bitnami/mongodb:4.2 --command -- mongo codefresh --host cf-mongodb --authenticationDatabase admin -u root -p $MONGODB_ROOT_PASSWORD --eval "db.accounts.find()"
kubectl run --namespace$NAMESPACE mongodb-new-client --rm --tty -i --restart='Never' --image docker.io/bitnami/mongodb:4.2 --command -- mongo codefresh --host cf-mongodb --authenticationDatabase admin -u root -p $MONGODB_ROOT_PASSWORD --eval "db.accounts.find()"
```

##### Backup and restore via Helm hooks
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp