mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-29 01:02:16 +03:00
demo-10
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#cloud-config
|
||||
|
||||
repo_update: true
|
||||
repo_upgrade: all
|
||||
|
||||
packages:
|
||||
- docker
|
||||
- lvm2
|
||||
|
||||
output:
|
||||
all: '| tee -a /var/log/cloud-init-output.log'
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
vgchange -ay
|
||||
|
||||
DEVICE="/dev/xvdh"
|
||||
|
||||
DEVICE_FS=`blkid -o value -s TYPE ${DEVICE}`
|
||||
exit 0
|
||||
pvcreate ${DEVICE}
|
||||
vgcreate data ${DEVICE}
|
||||
lvcreate --name volume1 -l 100%FREE data
|
||||
mkfs.ext4 /dev/data/volume1
|
||||
mkdir -p /data
|
||||
echo '/dev/data/volume /data defaults 0 0' >> /etc/fstab
|
||||
mount /data
|
||||
Reference in New Issue
Block a user