-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
persistent disk work and release notes
- Loading branch information
1 parent
57d397b
commit 05c1dce
Showing
5 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,35 @@ | ||
# Official Release v1.0.0 | ||
# Attention Required | ||
|
||
Replaces `app-autoscaler` feature in the v1.x cf genesis kits (and removed | ||
from v2.x kits). See MANUAL.md for usage details, including how to upgrade | ||
from embedded version in the v1.x cf kit. | ||
* The 1.0.0 version of the kit was released without allocating the local | ||
postgres database node a persistent disk. If you are not using an external | ||
database, this can easily lead to loss of autoscaler service data. This is | ||
fixed in this version of the kit - please follow the following instructions | ||
to avoid data loss. Do not panic. Everything is going to be okay. | ||
|
||
## Taking a Backup of the Existing Database | ||
|
||
Make sure you take this backup before upgrading the kit! | ||
|
||
* `bosh ssh` onto the `postgres_autoscaler` of the deployment. | ||
* become root with `sudo -i` | ||
* Run the following to take a backup `/var/vcap/packages/postgres-9.6.6/bin/pg_dumpall -U vcap >/tmp/pg_dump.sql` | ||
* Fetch the backup from the VM by exiting the VM and running `bosh -e <envname> -d <depname> scp postgres_autoscaler:/tmp/pg_dump.sql ~/autoscaler_pg_dump.sql` | ||
|
||
## Upgrade the Kit | ||
|
||
* Bump the kit number in your environment file to this version and deploy it with `genesis deploy <envname>` | ||
|
||
## Restore the Database | ||
|
||
Now you have a fresh, empty database. Let's put the data back. | ||
|
||
* Upload the backup you took to the VM with `bosh -e <envname> -d <depname> scp ~/autoscaler_pg_dump.sql postgres_autoscaler:/tmp/` | ||
* SSH onto the `postgres_autoscaler` VM with `bosh ssh` | ||
* Become root with `sudo -i` | ||
* Perform the restore with `/var/vcap/packages/postgres-9.6.6/bin/psql -U vcap postgres </tmp/autoscaler_pg_dump.sql` | ||
|
||
After this, service should be restored and the database should have a persistent disk. | ||
|
||
# Additional Features | ||
|
||
* The kit will now generate 10 year CA certs when creating a new deployment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
instance_groups: | ||
- name: postgres_autoscaler | ||
persistent_disk_type: (( grab params.db_disk_type || "10GB" )) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters