diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-10 12:31:32 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-11 08:02:07 +0200 |
commit | 2742958fd69c91c442685be62140f1e29e363b95 (patch) | |
tree | 987aee9281ce774c031c40d6626797ad7ec878e9 | |
parent | b5305b5cad5cbb0a2c072b29f2d4dc05126c39d4 (diff) | |
download | Puppet-2742958fd69c91c442685be62140f1e29e363b95.tar.gz Puppet-2742958fd69c91c442685be62140f1e29e363b95.tar.zst Puppet-2742958fd69c91c442685be62140f1e29e363b95.zip |
Move todos to readme.md and add first documentation
-rw-r--r-- | modules/profile/manifests/postgresql/backup_pgbouncer.pp | 2 | ||||
-rw-r--r-- | modules/profile/manifests/postgresql/ssl.pp | 2 | ||||
-rw-r--r-- | modules/role/manifests/cryptoportfolio.pp | 1 | ||||
-rw-r--r-- | readme.md | 32 | ||||
-rwxr-xr-x | scripts/ovh_cloud_instance/arch_host_script.sh | 4 | ||||
-rwxr-xr-x | scripts/ovh_vps_ssd/arch_chroot_script.sh | 4 |
6 files changed, 37 insertions, 8 deletions
diff --git a/modules/profile/manifests/postgresql/backup_pgbouncer.pp b/modules/profile/manifests/postgresql/backup_pgbouncer.pp index c82eefd..5fd7861 100644 --- a/modules/profile/manifests/postgresql/backup_pgbouncer.pp +++ b/modules/profile/manifests/postgresql/backup_pgbouncer.pp | |||
@@ -48,7 +48,7 @@ define profile::postgresql::backup_pgbouncer ( | |||
48 | content => "${pg_infos[pgbouncer_dbname]} = host=$pg_path$pg_port user=${pg_infos[dbuser]} dbname=${pg_infos[dbname]}", | 48 | content => "${pg_infos[pgbouncer_dbname]} = host=$pg_path$pg_port user=${pg_infos[dbuser]} dbname=${pg_infos[dbname]}", |
49 | } | 49 | } |
50 | 50 | ||
51 | # FIXME: current pam configuration requires password for postgres | 51 | # Current pam configuration requires password for postgres |
52 | # @profile::monitoring::local_service { "Database ${pg_infos[pgbouncer_dbname]} is available in pgbouncer": | 52 | # @profile::monitoring::local_service { "Database ${pg_infos[pgbouncer_dbname]} is available in pgbouncer": |
53 | # sudos => { | 53 | # sudos => { |
54 | # "naemon-postgresql-database-public" => "naemon ALL=(postgres) NOPASSWD: /usr/bin/psql -c select\ nspname\ from\ pg_catalog.pg_namespace ${pg_infos[pgbouncer_dbname]}" | 54 | # "naemon-postgresql-database-public" => "naemon ALL=(postgres) NOPASSWD: /usr/bin/psql -c select\ nspname\ from\ pg_catalog.pg_namespace ${pg_infos[pgbouncer_dbname]}" |
diff --git a/modules/profile/manifests/postgresql/ssl.pp b/modules/profile/manifests/postgresql/ssl.pp index 9b0a95c..b809a9d 100644 --- a/modules/profile/manifests/postgresql/ssl.pp +++ b/modules/profile/manifests/postgresql/ssl.pp | |||
@@ -78,6 +78,4 @@ define profile::postgresql::ssl ( | |||
78 | content => "ssl = on\nssl_key_file = '$ssl_key'\nssl_cert_file = '$ssl_cert'\n" | 78 | content => "ssl = on\nssl_key_file = '$ssl_key'\nssl_cert_file = '$ssl_cert'\n" |
79 | } | 79 | } |
80 | } | 80 | } |
81 | |||
82 | # FIXME: add monitoring for ssl | ||
83 | } | 81 | } |
diff --git a/modules/role/manifests/cryptoportfolio.pp b/modules/role/manifests/cryptoportfolio.pp index c675e91..8f7bfca 100644 --- a/modules/role/manifests/cryptoportfolio.pp +++ b/modules/role/manifests/cryptoportfolio.pp | |||
@@ -41,7 +41,6 @@ class role::cryptoportfolio ( | |||
41 | contain "role::cryptoportfolio::bot" | 41 | contain "role::cryptoportfolio::bot" |
42 | } | 42 | } |
43 | 43 | ||
44 | # FIXME: restore backup | ||
45 | unless empty($front_version) { | 44 | unless empty($front_version) { |
46 | contain "role::cryptoportfolio::front" | 45 | contain "role::cryptoportfolio::front" |
47 | } | 46 | } |
diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..d8d8046 --- /dev/null +++ b/readme.md | |||
@@ -0,0 +1,32 @@ | |||
1 | # Puppet configuration repository for immae.eu's services | ||
2 | |||
3 | This repository has the aim to help automate the installation of servers | ||
4 | planned for a specific task, with the help of Puppet. The host are | ||
5 | supposed to be listed in an LDAP-like database, which will contain the | ||
6 | necessary credentials, variable configuration and secrets for each | ||
7 | server. | ||
8 | |||
9 | ## Structure | ||
10 | |||
11 | The repository is structured along Puppet modules (`modules/` | ||
12 | directory). Each machine has one or several `role`, which determine the | ||
13 | set of programs and configuration to install. Each role may be | ||
14 | standalone, or require a set of `profile`, which is seen as a | ||
15 | reusable component. (The structure is inspired from the tutorial at | ||
16 | [https://www.craigdunn.org/2012/05/239/](https://www.craigdunn.org/2012/05/239/) ) | ||
17 | |||
18 | |||
19 | ## TODO | ||
20 | |||
21 | - Complete documentation | ||
22 | - Add some monitoring: | ||
23 | - modules/profile/manifests/postgresql/ssl.pp (check postgresql certificate) | ||
24 | - modules/profile/manifests/postgresql/backup\_pgbouncer.pp (check pgbouncer works) | ||
25 | - modules/profile/manifests/apache.pp (check website is accessible and ssl) | ||
26 | - modules/profile/manifests/mail.pp (check e-mails are going through) | ||
27 | - modules/profile/manifests/redis.pp (check redis is running) | ||
28 | - modules/role/\* (role-specific checks) | ||
29 | - Add redis replication and dumps | ||
30 | - Restore backups for cryptoportfolio | ||
31 | - Ensure latest by default for packages | ||
32 | - try to do a mkfs.ext4 for cloud vps | ||
diff --git a/scripts/ovh_cloud_instance/arch_host_script.sh b/scripts/ovh_cloud_instance/arch_host_script.sh index 42dcc4a..378b0be 100755 --- a/scripts/ovh_cloud_instance/arch_host_script.sh +++ b/scripts/ovh_cloud_instance/arch_host_script.sh | |||
@@ -25,7 +25,7 @@ PART="/dev/disk/by-uuid/$UUID" | |||
25 | # mkfs.ext4 -F -U "$UUID" "$DEVICE" | 25 | # mkfs.ext4 -F -U "$UUID" "$DEVICE" |
26 | sudo mount "$DEVICE" /mnt | 26 | sudo mount "$DEVICE" /mnt |
27 | 27 | ||
28 | ##### FIXME: mkfs.ext4 would be better #### | 28 | ##### mkfs.ext4 would be better #### |
29 | for i in /mnt/*; do | 29 | for i in /mnt/*; do |
30 | if [ "$i" = "/mnt/boot" ]; then | 30 | if [ "$i" = "/mnt/boot" ]; then |
31 | # keep /boot/grub | 31 | # keep /boot/grub |
@@ -34,7 +34,7 @@ for i in /mnt/*; do | |||
34 | sudo rm -rf $i | 34 | sudo rm -rf $i |
35 | fi | 35 | fi |
36 | done | 36 | done |
37 | ##### /FIXME #### | 37 | ##### / #### |
38 | 38 | ||
39 | sudo pacstrap -G /mnt base git puppet | 39 | sudo pacstrap -G /mnt base git puppet |
40 | 40 | ||
diff --git a/scripts/ovh_vps_ssd/arch_chroot_script.sh b/scripts/ovh_vps_ssd/arch_chroot_script.sh index 7b7887f..57e793b 100755 --- a/scripts/ovh_vps_ssd/arch_chroot_script.sh +++ b/scripts/ovh_vps_ssd/arch_chroot_script.sh | |||
@@ -10,7 +10,7 @@ DEVICE=$(realpath "$PART") | |||
10 | # mkfs.ext4 -F -U "$UUID" "$DEVICE" | 10 | # mkfs.ext4 -F -U "$UUID" "$DEVICE" |
11 | mount "$DEVICE" /mnt | 11 | mount "$DEVICE" /mnt |
12 | 12 | ||
13 | ##### FIXME: mkfs.ext4 would be better #### | 13 | ##### mkfs.ext4 would be better #### |
14 | for i in /mnt/*; do | 14 | for i in /mnt/*; do |
15 | if [ "$i" = "/mnt/boot" ]; then | 15 | if [ "$i" = "/mnt/boot" ]; then |
16 | # keep /boot/grub | 16 | # keep /boot/grub |
@@ -19,7 +19,7 @@ for i in /mnt/*; do | |||
19 | rm -rf $i | 19 | rm -rf $i |
20 | fi | 20 | fi |
21 | done | 21 | done |
22 | ##### /FIXME #### | 22 | ##### / #### |
23 | 23 | ||
24 | pacstrap -G /mnt base git puppet | 24 | pacstrap -G /mnt base git puppet |
25 | 25 | ||