-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
923e17b
commit 97c1ea1
Showing
14 changed files
with
395 additions
and
4 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file added
BIN
+23.1 MB
...viders/registry.terraform.io/poseidon/ct/0.13.0/linux_amd64/terraform-provider-ct_v0.13.0
Binary file not shown.
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,15 @@ | ||
variant: flatcar | ||
version: 1.0.0 | ||
|
||
storage: | ||
disks: | ||
- device: /dev/vdb | ||
wipe_table: true | ||
|
||
files: | ||
- path: /etc/systemd/system.conf.d/10-env-base.conf | ||
mode: 0644 | ||
contents: | ||
inline: | | ||
[Manager] | ||
DefaultEnvironment=FC_TEST_VAR=hello-world |
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,30 @@ | ||
variant: flatcar | ||
version: 1.0.0 | ||
|
||
storage: | ||
disks: | ||
- device: /dev/vdb | ||
partitions: | ||
- number: 1 | ||
label: mnt_data | ||
resize: true | ||
size_mib: 0 | ||
|
||
filesystems: | ||
- path: /mnt/data | ||
device: /dev/disk/by-partlabel/mnt_data | ||
format: ext4 | ||
wipe_filesystem: true | ||
label: mnt_data | ||
with_mount_unit: true | ||
|
||
links: | ||
- path: /etc/systemd/system/multi-user.target.wants/docker.service | ||
target: /usr/lib/systemd/system/docker.service | ||
hard: false | ||
overwrite: true | ||
|
||
systemd: | ||
units: | ||
- name: docker.service | ||
enabled: true |
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,30 @@ | ||
variant: flatcar | ||
version: 1.0.0 | ||
|
||
systemd: | ||
units: | ||
- name: iscsi.service | ||
enabled: true | ||
|
||
- name: iscsi-volume.service | ||
enabled: true | ||
contents: | | ||
[Unit] | ||
Description=Mount iSCSI Volume | ||
Wants=network-online.target | ||
After=network-online.target iscsid.service | ||
Requires=iscsid.service | ||
ConditionEnvironment=FC_ISCSI_PORTAL | ||
ConditionEnvironment=FC_ISCSI_TARGET | ||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStartPre=/bin/mkdir -p /mnt/iscsi | ||
ExecStartPre=/sbin/iscsiadm -m discovery -t st -p ${FC_ISCSI_PORTAL} | ||
ExecStartPre=-/sbin/iscsiadm -m node --targetname ${FC_ISCSI_TARGET} --portal ${FC_ISCSI_PORTAL} --logout | ||
ExecStart=/sbin/iscsiadm -m node --targetname ${FC_ISCSI_TARGET} --portal ${FC_ISCSI_PORTAL} --login | ||
ExecStart=/bin/sh -c "sleep 5 && /bin/mount /dev/disk/by-id/scsi-*-part1 /mnt/iscsi" | ||
ExecStop=/bin/umount /mnt/iscsi | ||
ExecStop=/sbin/iscsiadm -m node --targetname ${FC_ISCSI_TARGET} --portal ${FC_ISCSI_PORTAL} --logout | ||
[Install] | ||
WantedBy=multi-user.target |
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,37 @@ | ||
variant: flatcar | ||
version: 1.0.0 | ||
|
||
storage: | ||
files: | ||
- path: /etc/systemd/system.conf.d/11-env-nfs.conf | ||
mode: 0644 | ||
contents: | ||
inline: | | ||
[Manager] | ||
DefaultEnvironment=FC_NFS_HOST=10.0.2.11 | ||
systemd: | ||
units: | ||
- name: mnt-nfs-work.mount | ||
enabled: true | ||
contents: | | ||
[Unit] | ||
Before=remote-fs.target | ||
[Mount] | ||
What=${FC_NFS_HOST}:/volume1/cluster/work | ||
Where=/mnt/nfs/work | ||
Type=nfs | ||
[Install] | ||
WantedBy=remote-fs.target | ||
- name: mnt-nfs-volumes.mount | ||
enabled: true | ||
contents: | | ||
[Unit] | ||
Before=remote-fs.target | ||
[Mount] | ||
What=${FC_NFS_HOST}:/volume1/cluster/docker/volumes | ||
Where=/mnt/nfs/volumes | ||
Type=nfs | ||
[Install] | ||
WantedBy=remote-fs.target |
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,10 @@ | ||
variant: flatcar | ||
version: 1.0.0 | ||
|
||
passwd: | ||
users: | ||
- name: louis | ||
ssh_authorized_keys: | ||
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAPME1Cu6epBXHCAI6pRjhuWC5HprHsqLlrokNRqdpcd/yKvP4KauPGKzZpshG9P/EUJ/ZYCh1diD4CUZgkzY54n2GuDmfxqsnhjkdI9g8Ceu1VsXTLwvW62BVDQgXaVBhds9rd+f+DTIEMqQvCnwkWSnMCPTY/+mi4PqireJgdQ18UXkSGjWtbDb+BgJB9BLI61Wx+eoKe8JMjJjoRhV1xxinS1XlghATh9onddaM6k1uVuLi8hQRYRqbrBwUQ21P+pLQbe6XJLdw65jnThSH/9BJ59ePqpWS+H43fzl9iAyyZFoBV9IVT+P4roEIAIIs1O4Kp02R09azbml8JkON louis@home | ||
password_hash: "$6$4DcadFC0.wM$.3jy/J4hsDnP55ehJM2zTEWyCrrc.O7m3N2/j2Zohel8n1qQJM73mwmHFFOyuTbp8eZH4XReUyzE1EbyqXx/b." | ||
groups: [sudo, docker] |
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,38 @@ | ||
data "ct_config" "swarm_manager" { | ||
content = file("files/sections/base.yml") | ||
strict = true | ||
pretty_print = false | ||
|
||
snippets = [ | ||
# Sections | ||
file("files/sections/users.yml"), | ||
file("files/sections/docker.yml"), | ||
file("files/sections/nfs.yml") | ||
] | ||
} | ||
|
||
data "ct_config" "swarm_worker" { | ||
content = file("files/sections/base.yml") | ||
strict = true | ||
pretty_print = false | ||
|
||
snippets = [ | ||
# Sections | ||
file("files/sections/users.yml"), | ||
file("files/sections/docker.yml"), | ||
file("files/sections/nfs.yml") | ||
] | ||
} | ||
|
||
data "ct_config" "plex" { | ||
content = file("files/sections/base.yml") | ||
strict = true | ||
pretty_print = false | ||
|
||
snippets = [ | ||
# Sections | ||
file("files/sections/users.yml"), | ||
file("files/sections/docker.yml"), | ||
file("files/sections/nfs.yml") | ||
] | ||
} |
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,11 @@ | ||
output "swarm_manager" { | ||
value = data.ct_config.swarm_manager.rendered | ||
} | ||
|
||
output "swarm_worker" { | ||
value = data.ct_config.swarm_worker.rendered | ||
} | ||
|
||
output "plex" { | ||
value = data.ct_config.plex.rendered | ||
} |
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,10 @@ | ||
terraform { | ||
required_providers { | ||
ct = { | ||
source = "poseidon/ct" | ||
version = "0.13.0" | ||
} | ||
} | ||
} | ||
|
||
provider "ct" {} |
Oops, something went wrong.