Skip to content

Commit

Permalink
- Fixed Ubuntu EFS launch bundle install
Browse files Browse the repository at this point in the history
  • Loading branch information
gitwater committed Oct 29, 2021
1 parent 80bc2a2 commit b44c622
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/paco/application/ec2_launch_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,9 +952,9 @@ def lb_add_efs(self, bundle_name, resource):
raise AttributeError(f"OS type {resource.instance_ami_type} does not support EFS")
install_efs_utils = ec2lm_commands.user_data_script['install_efs_utils'][resource.instance_ami_type_generic]
mount_efs = ec2lm_commands.user_data_script['mount_efs'][resource.instance_ami_type_generic]
if resource.instance_ami_type in ['ubuntu_16', 'ubuntu_20']:
install_efs_utils = ec2lm_commands.user_data_script['install_efs_utils'][resource.instance_ami_type]
mount_efs = ec2lm_commands.user_data_script['mount_efs'][resource.instance_ami_type]
if resource.instance_ami_type_generic == 'ubuntu':
install_efs_utils = ec2lm_commands.user_data_script['install_efs_utils'][resource.instance_ami_type_generic]
mount_efs = ec2lm_commands.user_data_script['mount_efs'][resource.instance_ami_type_generic]

launch_script = f"""#!/bin/bash
Expand Down
19 changes: 3 additions & 16 deletions src/paco/application/ec2lm_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,7 @@
'install_efs_utils': {
'amazon': 'yum install -y amazon-efs-utils cachefilesd',
'centos': 'yum install -y amazon-efs-utils cachefilesd',
'ubuntu': 'apt-get install cachefilesd -y',
'ubuntu_16': """
apt-get install cachefilesd git binutils make -y
LB_DIR=$(pwd)
cd /tmp
git clone https://github.com/aws/efs-utils
cd efs-utils/
./build-deb.sh
apt-get -y install ./build/amazon-efs-utils*deb
cd ${LB_DIR}
""",
'ubuntu_20': """
'ubuntu': """
apt-get install cachefilesd git binutils make -y
LB_DIR=$(pwd)
cd /tmp
Expand All @@ -79,7 +68,7 @@
./build-deb.sh
apt-get -y install ./build/amazon-efs-utils*deb
cd ${LB_DIR}
""",
"""
},
'install_cfn_init': {
'amazon': '',
Expand Down Expand Up @@ -118,9 +107,7 @@
""" },
'mount_efs': {
'amazon': 'mount -a -t efs',
'ubuntu': 'mount -a -t nfs',
'ubuntu_16': 'mount -a -t efs',
'ubuntu_20': 'mount -a -t efs',
'ubuntu': 'mount -a -t efs',
'centos': 'mount -a -t nfs'
}

Expand Down

0 comments on commit b44c622

Please sign in to comment.