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
Configure collections_publisher_db_admin machine class #11353
Merged
+99
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
hieradata_aws/class/integration/collections_publisher_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_collections_publisher_production_daily": | ||
ensure: "present" | ||
hour: "0" | ||
minute: "0" | ||
action: "pull" | ||
dbms: "mysql" | ||
storagebackend: "s3" | ||
database: "collections_publisher_production" | ||
database_hostname: "collections-publisher-mysql" | ||
temppath: "/tmp/collections_publisher_production" | ||
url: "govuk-production-database-backups" | ||
path: "collections-publisher-mysql" | ||
# "push_collections_publisher_production_daily": | ||
# ensure: "present" | ||
# hour: "5" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "collections_publisher_production" | ||
# database_hostname: "collections-publisher-mysql" | ||
# temppath: "/tmp/collections_publisher_production" | ||
# url: "govuk-integration-database-backups" | ||
# path: "collections-publisher-mysql" |
13 changes: 13 additions & 0 deletions
13
hieradata_aws/class/production/collections_publisher_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,13 @@ | ||
# govuk_env_sync::tasks: | ||
# "push_collections_publisher_production_daily": | ||
# ensure: "present" | ||
# hour: "23" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "collections_publisher_production" | ||
# database_hostname: "collections-publisher-mysql" | ||
# temppath: "/tmp/collections_publisher_production" | ||
# url: "govuk-production-database-backups" | ||
# path: "collections-publisher-mysql" |
25 changes: 25 additions & 0 deletions
25
hieradata_aws/class/staging/collections_publisher_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_collections_publisher_production_daily": | ||
ensure: "present" | ||
hour: "0" | ||
minute: "0" | ||
action: "pull" | ||
dbms: "mysql" | ||
storagebackend: "s3" | ||
database: "collections_publisher_production" | ||
database_hostname: "collections-publisher-mysql" | ||
temppath: "/tmp/collections_publisher_production" | ||
url: "govuk-production-database-backups" | ||
path: "collections-publisher-mysql" | ||
# "push_collections_publisher_production_daily": | ||
# ensure: "present" | ||
# hour: "5" | ||
# minute: "0" | ||
# action: "push" | ||
# dbms: "mysql" | ||
# storagebackend: "s3" | ||
# database: "collections_publisher_production" | ||
# database_hostname: "collections-publisher-mysql" | ||
# temppath: "/tmp/collections_publisher_production" | ||
# url: "govuk-staging-database-backups" | ||
# path: "collections-publisher-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
34 changes: 34 additions & 0 deletions
34
modules/govuk/manifests/node/s_collections_publisher_db_admin.pp
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_collections_db_admin | ||
# | ||
# This machine class is used to administer the Collections Publisher | ||
# 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_collections_publisher_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::collections_publisher::db': } | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike the PostgreSQL equivalent, we don't need to set a
s_collections_publisher_db_admin::apt_mirror_hostname
here, as it isn't used anywhere in thegovuk::node::s_collections_publisher_db_admin
class.