-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AWS EKS tutorial change to new terraform script (#463)
* Extracts certain values to variables * Adds TF variables for AWS EKS tutorial, generalizes userdata.sh script * Adds some small corrections * Modifies aws-eks-tutorial to use the deploy/aws terraform script * Removes comments from variables.tf * Adds step in tutorial introduction * Adds explanation why scaling out is done with terraform * Adds warning about instance types breaking user data setup * Changes tutorial instace types of monitor and tidb to not use local ssd * Updates tutorial docs to reflect instances in tutorial var file
- Loading branch information
Showing
6 changed files
with
141 additions
and
367 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
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 @@ | ||
pd_instance_type = "c5d.large" | ||
tikv_instance_type = "c5d.large" | ||
tidb_instance_type = "c4.large" | ||
monitor_instance_type = "c5.large" | ||
|
||
pd_count = 1 | ||
tikv_count = 1 | ||
tidb_count = 1 | ||
|
||
cluster_name = "aws_tutorial" | ||
tikv_root_volume_size = "50" |
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,35 @@ | ||
# set ulimits | ||
cat <<EOF > /etc/security/limits.d/99-tidb.conf | ||
root soft nofile 1000000 | ||
root hard nofile 1000000 | ||
root soft core unlimited | ||
root soft stack 10240 | ||
EOF | ||
# config docker ulimit | ||
cp /usr/lib/systemd/system/docker.service /etc/systemd/system/docker.service | ||
sed -i 's/LimitNOFILE=infinity/LimitNOFILE=1048576/' /etc/systemd/system/docker.service | ||
sed -i 's/LimitNPROC=infinity/LimitNPROC=1048576/' /etc/systemd/system/docker.service | ||
systemctl daemon-reload | ||
systemctl restart docker | ||
|
||
# format and mount nvme disk | ||
if grep nvme0n1 /etc/fstab || grep nvme1n1 /etc/fstab; then | ||
echo "disk already mounted" | ||
else | ||
if mkfs -t ext4 /dev/nvme1n1 ; then | ||
|
||
mkdir -p /mnt/disks/ssd1 | ||
cat <<EOF >> /etc/fstab | ||
/dev/nvme1n1 /mnt/disks/ssd1 ext4 defaults,nofail,noatime,nodelalloc 0 2 | ||
EOF | ||
mount -a | ||
else | ||
mkfs -t ext4 /dev/nvme0n1 | ||
mkdir -p /mnt/disks/ssd1 | ||
cat <<EOF >> /etc/fstab | ||
/dev/nvme0n1 /mnt/disks/ssd1 ext4 defaults,nofail,noatime,nodelalloc 0 2 | ||
EOF | ||
mount -a | ||
fi | ||
fi | ||
|
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
Oops, something went wrong.