This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11359 from alphagov/mysql_db_admin
Configure machine classes for MySQL DB Admin
- Loading branch information
Showing
17 changed files
with
396 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
govuk_env_sync::tasks: | ||
"pull_release_production_daily": | ||
ensure: "present" | ||
hour: "0" | ||
minute: "0" | ||
action: "pull" | ||
dbms: "mysql" | ||
storagebackend: "s3" | ||
database: "release_production" | ||
database_hostname: "release-mysql" | ||
temppath: "/tmp/release_production" | ||
url: "govuk-production-database-backups" | ||
path: "release-mysql" | ||
# "push_release_production_daily": | ||
# ensure: "present" | ||
# hour: "5" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "release_production" | ||
# database_hostname: "release-mysql" | ||
# temppath: "/tmp/release_production" | ||
# url: "govuk-integration-database-backups" | ||
# path: "release-mysql" |
25 changes: 25 additions & 0 deletions
25
hieradata_aws/class/integration/search_admin_db_admin.yaml
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,25 @@ | ||
govuk_env_sync::tasks: | ||
"pull_search_admin_production_daily": | ||
ensure: "present" | ||
hour: "0" | ||
minute: "0" | ||
action: "pull" | ||
dbms: "mysql" | ||
storagebackend: "s3" | ||
database: "search_admin_production" | ||
database_hostname: "search-admin-mysql" | ||
temppath: "/tmp/search_admin_production" | ||
url: "govuk-production-database-backups" | ||
path: "search-admin-mysql" | ||
# "push_search_admin_production_daily": | ||
# ensure: "present" | ||
# hour: "5" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "search_admin_production" | ||
# database_hostname: "search-admin-mysql" | ||
# temppath: "/tmp/search_admin_production" | ||
# url: "govuk-integration-database-backups" | ||
# path: "search-admin-mysql" |
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,25 @@ | ||
govuk_env_sync::tasks: | ||
"pull_signon_production_daily": | ||
ensure: "present" | ||
hour: "0" | ||
minute: "0" | ||
action: "pull" | ||
dbms: "mysql" | ||
storagebackend: "s3" | ||
database: "signon_production" | ||
database_hostname: "signon-mysql" | ||
temppath: "/tmp/signon_production" | ||
url: "govuk-production-database-backups" | ||
path: "signon-mysql" | ||
# "push_signon_production_daily": | ||
# ensure: "present" | ||
# hour: "5" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "signon_production" | ||
# database_hostname: "signon-mysql" | ||
# temppath: "/tmp/signon_production" | ||
# url: "govuk-integration-database-backups" | ||
# path: "signon-mysql" |
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,25 @@ | ||
govuk_env_sync::tasks: | ||
"pull_whitehall_production_daily": | ||
ensure: "present" | ||
hour: "0" | ||
minute: "0" | ||
action: "pull" | ||
dbms: "mysql" | ||
storagebackend: "s3" | ||
database: "whitehall_production" | ||
database_hostname: "whitehall-mysql" | ||
temppath: "/tmp/whitehall_production" | ||
url: "govuk-production-database-backups" | ||
path: "whitehall-mysql" | ||
# "push_whitehall_production_daily": | ||
# ensure: "present" | ||
# hour: "5" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "whitehall_production" | ||
# database_hostname: "whitehall-mysql" | ||
# temppath: "/tmp/whitehall_production" | ||
# url: "govuk-integration-database-backups" | ||
# path: "whitehall-mysql" |
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,13 @@ | ||
# govuk_env_sync::tasks: | ||
# "push_release_production_daily": | ||
# ensure: "present" | ||
# hour: "23" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "release_production" | ||
# database_hostname: "release-mysql" | ||
# temppath: "/tmp/release_production" | ||
# url: "govuk-production-database-backups" | ||
# path: "release-mysql" |
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,13 @@ | ||
# govuk_env_sync::tasks: | ||
# "push_search_admin_production_daily": | ||
# ensure: "present" | ||
# hour: "23" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "search_admin_production" | ||
# database_hostname: "search-admin-mysql" | ||
# temppath: "/tmp/search_admin_production" | ||
# url: "govuk-production-database-backups" | ||
# path: "search-admin-mysql" |
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,13 @@ | ||
# govuk_env_sync::tasks: | ||
# "push_signon_production_daily": | ||
# ensure: "present" | ||
# hour: "23" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "signon_production" | ||
# database_hostname: "signon-mysql" | ||
# temppath: "/tmp/signon_production" | ||
# url: "govuk-production-database-backups" | ||
# path: "signon-mysql" |
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,13 @@ | ||
# govuk_env_sync::tasks: | ||
# "push_whitehall_production_daily": | ||
# ensure: "present" | ||
# hour: "23" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "whitehall_production" | ||
# database_hostname: "whitehall-mysql" | ||
# temppath: "/tmp/whitehall_production" | ||
# url: "govuk-production-database-backups" | ||
# path: "whitehall-mysql" |
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,25 @@ | ||
govuk_env_sync::tasks: | ||
"pull_release_production_daily": | ||
ensure: "present" | ||
hour: "0" | ||
minute: "0" | ||
action: "pull" | ||
dbms: "mysql" | ||
storagebackend: "s3" | ||
database: "release_production" | ||
database_hostname: "release-mysql" | ||
temppath: "/tmp/release_production" | ||
url: "govuk-production-database-backups" | ||
path: "release-mysql" | ||
# "push_release_production_daily": | ||
# ensure: "present" | ||
# hour: "5" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "release_production" | ||
# database_hostname: "release-mysql" | ||
# temppath: "/tmp/release_production" | ||
# url: "govuk-staging-database-backups" | ||
# path: "release-mysql" |
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,25 @@ | ||
govuk_env_sync::tasks: | ||
"pull_search_admin_production_daily": | ||
ensure: "present" | ||
hour: "0" | ||
minute: "0" | ||
action: "pull" | ||
dbms: "mysql" | ||
storagebackend: "s3" | ||
database: "search_admin_production" | ||
database_hostname: "search-admin-mysql" | ||
temppath: "/tmp/search_admin_production" | ||
url: "govuk-production-database-backups" | ||
path: "search-admin-mysql" | ||
# "push_search_admin_production_daily": | ||
# ensure: "present" | ||
# hour: "5" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "search_admin_production" | ||
# database_hostname: "search-admin-mysql" | ||
# temppath: "/tmp/search_admin_production" | ||
# url: "govuk-staging-database-backups" | ||
# path: "search-admin-mysql" |
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,25 @@ | ||
govuk_env_sync::tasks: | ||
"pull_signon_production_daily": | ||
ensure: "present" | ||
hour: "0" | ||
minute: "0" | ||
action: "pull" | ||
dbms: "mysql" | ||
storagebackend: "s3" | ||
database: "signon_production" | ||
database_hostname: "signon-mysql" | ||
temppath: "/tmp/signon_production" | ||
url: "govuk-production-database-backups" | ||
path: "signon-mysql" | ||
# "push_signon_production_daily": | ||
# ensure: "present" | ||
# hour: "5" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "signon_production" | ||
# database_hostname: "signon-mysql" | ||
# temppath: "/tmp/signon_production" | ||
# url: "govuk-staging-database-backups" | ||
# path: "signon-mysql" |
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,25 @@ | ||
govuk_env_sync::tasks: | ||
"pull_whitehall_production_daily": | ||
ensure: "present" | ||
hour: "0" | ||
minute: "0" | ||
action: "pull" | ||
dbms: "mysql" | ||
storagebackend: "s3" | ||
database: "whitehall_production" | ||
database_hostname: "whitehall-mysql" | ||
temppath: "/tmp/whitehall_production" | ||
url: "govuk-production-database-backups" | ||
path: "whitehall-mysql" | ||
# "push_whitehall_production_daily": | ||
# ensure: "present" | ||
# hour: "5" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "whitehall_production" | ||
# database_hostname: "whitehall-mysql" | ||
# temppath: "/tmp/whitehall_production" | ||
# url: "govuk-staging-database-backups" | ||
# path: "whitehall-mysql" |
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,34 @@ | ||
# == Class: govuk_node::s_release_db_admin | ||
# | ||
# This machine class is used to administer the Release | ||
# MySQL RDS instances. | ||
# | ||
# === Parameters | ||
# | ||
# [*mysql_db_host*] | ||
# The database hostname | ||
# | ||
# [*mysql_db_password*] | ||
# The database password | ||
# | ||
# [*mysql_db_user*] | ||
# The database user to connect to the remote database as | ||
# | ||
class govuk::node::s_release_db_admin( | ||
$mysql_db_host = undef, | ||
$mysql_db_password = undef, | ||
$mysql_db_user = undef, | ||
) { | ||
include ::govuk::node::s_base | ||
include govuk_env_sync | ||
|
||
file { '/root/.my.cnf': | ||
ensure => 'present', | ||
owner => 'root', | ||
group => 'root', | ||
content => template('govuk/mysql_my.cnf.erb'), | ||
} | ||
|
||
# include all MySQL classes that create databases and users | ||
-> class { '::govuk::apps::release::db': } | ||
} |
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,34 @@ | ||
# == Class: govuk_node::s_search_admin_db_admin | ||
# | ||
# This machine class is used to administer the Search Admin | ||
# MySQL RDS instances. | ||
# | ||
# === Parameters | ||
# | ||
# [*mysql_db_host*] | ||
# The database hostname | ||
# | ||
# [*mysql_db_password*] | ||
# The database password | ||
# | ||
# [*mysql_db_user*] | ||
# The database user to connect to the remote database as | ||
# | ||
class govuk::node::s_search_admin_db_admin( | ||
$mysql_db_host = undef, | ||
$mysql_db_password = undef, | ||
$mysql_db_user = undef, | ||
) { | ||
include ::govuk::node::s_base | ||
include govuk_env_sync | ||
|
||
file { '/root/.my.cnf': | ||
ensure => 'present', | ||
owner => 'root', | ||
group => 'root', | ||
content => template('govuk/mysql_my.cnf.erb'), | ||
} | ||
|
||
# include all MySQL classes that create databases and users | ||
-> class { '::govuk::apps::search_admin::db': } | ||
} |
Oops, something went wrong.