Skip to content

Commit

Permalink
new: access point no longer needed
Browse files Browse the repository at this point in the history
- Can mount the /var/solr/data into a different directory on the EFS mount w/o efs ap :)
  • Loading branch information
nickumia-reisys committed May 25, 2022
1 parent 622b814 commit a7f84a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 2 additions & 2 deletions terraform/provision/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ resource "aws_ecs_task_definition" "solr" {
# command = ["/bin/bash", "-c", "cd /tmp; /usr/bin/wget https://gist.githubusercontent.com/FuhuXia/91cac09b23ef29e5f219ba83df8b808e/raw/9a99a5621a2ebd204ed1b19a3843e2fd743c3fea/solr-setup-for-catalog.sh; chmod 755 solr-setup-for-catalog.sh; ./solr-setup-for-catalog.sh; cd -; solr-fg -m 12g"]
command = ["/bin/bash", "-c", join(" ", [
"sed -i 's/{region}/${var.region}/g' /etc/amazon/efs/efs-utils.conf;",
"printf \"\n${aws_efs_file_system.solr-data.id}:/ /var/solr/data efs tls,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,_netdev 0 0\n\" >> /etc/fstab;",
"mount -t efs -o tls,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport ${aws_efs_file_system.solr-data.id}:/ /var/solr/data;",
"printf \"\n${aws_efs_file_system.solr-data.id}:/data1 /var/solr/data efs tls,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,_netdev 0 0\n\" >> /etc/fstab;",
"mount -t efs -o tls,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport ${aws_efs_file_system.solr-data.id}:/data1 /var/solr/data;",
"cd /tmp; /usr/bin/wget https://gist.githubusercontent.com/nickumia-reisys/18544d2c6aad4160293bda1fec6ead7f/raw/bf668a33a1e3ac2c20342389ab9c8cb6cadeed8b/solr_setup.sh; /bin/bash solr_setup.sh;",
"cd -; su -c \"",
"init-var-solr; precreate-core ckan /tmp/ckan_config; chown -R 8983:8983 /var/solr/data; solr-fg -m 12g\" -m solr"
Expand Down
12 changes: 0 additions & 12 deletions terraform/provision/efs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@ resource "aws_efs_file_system" "solr-data" {
}
}

resource "aws_efs_access_point" "solr-data-main" {
file_system_id = aws_efs_file_system.solr-data.id
root_directory {
path = "/data1"
creation_info {
owner_gid = "8983"
owner_uid = "8983"
permissions = "755"
}
}
}

resource "aws_efs_mount_target" "all" {
count = length(module.vpc.public_subnets)
file_system_id = aws_efs_file_system.solr-data.id
Expand Down

0 comments on commit a7f84a1

Please sign in to comment.