Commit 0b36e1c2 authored by Luca Cinquini's avatar Luca Cinquini
Browse files

Adding EC2 instance tag at boot time.

parent de9e756e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -13,9 +13,11 @@ Content-Type: text/x-shellscript; charset="us-ascii"
#!/bin/bash
# Set any ECS agent configuration options
echo "ECS_CLUSTER=EsgfCluster" >> /etc/ecs/ecs.config
echo "ECS_INSTANCE_ATTRIBUTES={\"esgf_type\":\"master_node\"}" >> /etc/ecs/ecs.config

# mount the EFS file system
# must also restart docker and docker agent for the file system to become available to docker containers
# TODO: parametrize the EFS endpoint
sudo yum install -y nfs-utils
sudo stop ecs
sudo mkdir -p /esgf_data
@@ -26,5 +28,7 @@ sudo mount -a -t nfs4
sudo service docker restart
sudo start ecs

# extract the ESGF host configuration to the standard location
tar xvf /esgf_data/esgf_config.tar -C /home/ec2-user

--==BOUNDARY==--