-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code review updates, to be squashed into prior commit
- Loading branch information
Marc Paradise
committed
Jan 29, 2016
1 parent
a3d0d55
commit 67f728e
Showing
9 changed files
with
50 additions
and
49 deletions.
There are no files selected for viewing
14 changes: 4 additions & 10 deletions
14
omnibus/files/private-chef-upgrades/001/014_upgrade_migration_schema.rb
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,24 +1,18 @@ | ||
define_upgrade do | ||
|
||
if Partybus.config.bootstrap_server | ||
|
||
must_be_data_master | ||
|
||
username = Partybus.config.postgres['db_superuser'] | ||
password = Partybus.config.postgres['db_superuser_password'] | ||
# This ensures that sqitch is properly set up, even when upgrading from private chef (which did | ||
# not use sqitch), as well as ensuring the baseline schema is present for opscode_chef. | ||
# | ||
# Note that we only have to apply it in this upgrade, because this is the first sqitch migration | ||
# that will be run. If this doesn't need to be run, that tells us they're upgrading from an installation | ||
# that already has applied it. | ||
run_sqitch('@1.0.4', 'oc_erchef/schema/baseline', 'opscode_chef', | ||
username: username, password: password) | ||
|
||
# the actual migration we're concerned with for this release, which | ||
# includes schema upgrade for migration state. | ||
run_sqitch('@2.2.4', 'oc_erchef/schema', 'opscode_chef', | ||
username: username, password: password) | ||
run_sqitch('@1.0.4', 'oc_erchef', path: 'oc_erchef/schema/baseline') | ||
|
||
# The actual schema change for this release - | ||
# track more state values in migration_state. | ||
run_sqitch('@2.2.4', 'oc_erchef') | ||
end | ||
end |
8 changes: 2 additions & 6 deletions
8
omnibus/files/private-chef-upgrades/001/016_add_org_tables_osc_hash_types.rb
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,14 +1,10 @@ | ||
define_upgrade do | ||
|
||
if Partybus.config.bootstrap_server | ||
|
||
must_be_data_master | ||
|
||
# run 2.4.0 migrations to update db - includes adding org association/user tables | ||
# schema updates include adding org association/user tables | ||
# and adding the OSC password hash types to the password_hash_type_enum | ||
run_sqitch('@2.4.0', 'oc_erchef/schema', 'opscode_chef', | ||
username: Partybus.config.postgres['db_superuser'], | ||
password: Partybus.config.postgres['db_superuser_password']) | ||
|
||
run_sqitch('@2.4.0', 'oc_erchef') | ||
end | ||
end |
12 changes: 6 additions & 6 deletions
12
omnibus/files/private-chef-upgrades/001/020_multi_key_schema_migration.rb
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
6 changes: 3 additions & 3 deletions
6
omnibus/files/private-chef-upgrades/001/021_key_schema_migration_2.rb
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,8 +1,8 @@ | ||
define_upgrade do | ||
if Partybus.config.bootstrap_server | ||
must_be_data_master | ||
run_sqitch('@2.9.0', 'oc_erchef/schema', 'opscode_chef', | ||
username: Partybus.config.postgres['db_superuser'], | ||
password: Partybus.config.postgres['db_superuser_password']) | ||
# 1. cookbook artifacts | ||
# 2. adds last update tracking to keys table. | ||
run_sqitch('@2.9.0', 'oc_erchef') | ||
end | ||
end |
5 changes: 2 additions & 3 deletions
5
omnibus/files/private-chef-upgrades/001/022_cbv_type_addition.rb
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,8 +1,7 @@ | ||
define_upgrade do | ||
if Partybus.config.bootstrap_server | ||
must_be_data_master | ||
run_sqitch('@cbv-type', 'oc_erchef/schema', 'opscode_chef', | ||
username: Partybus.config.postgres['db_superuser'], | ||
password: Partybus.config.postgres['db_superuser_password']) | ||
# Performance improvements for cookbook fetching. | ||
run_sqitch('@cbv-type', 'oc_erchef') | ||
end | ||
end |
5 changes: 2 additions & 3 deletions
5
omnibus/files/private-chef-upgrades/001/027_node_policyfile_fields.rb
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,9 +1,8 @@ | ||
define_upgrade do | ||
if Partybus.config.bootstrap_server | ||
must_be_data_master | ||
run_sqitch('@node-policyfile-fields', 'oc_erchef/schema', 'opscode_chef', | ||
username: Partybus.config.postgres['db_superuser'], | ||
password: Partybus.config.postgres['db_superuser_password']) | ||
# Add policyfile fields to node table | ||
run_sqitch('@node-policyfile-fields', 'oc_erchef') | ||
end | ||
end | ||
|
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
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