Skip to content

Commit

Permalink
Upate paths to match new boot directory in ec2autorun
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang committed Jul 11, 2015
1 parent ea3de89 commit 49f535d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cm/boot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

LOCAL_PATH = os.getcwd()
CM_HOME = '/mnt/cm'
CM_BOOT_PATH = '/tmp/cm'
CM_BOOT_PATH = '/opt/cloudman/boot'
USER_DATA_FILE = 'userData.yaml'
SYSTEM_MESSAGES_FILE = '/mnt/cm/sysmsg.txt'
CM_REMOTE_FILENAME = 'cm.tar.gz'
Expand Down Expand Up @@ -127,7 +127,7 @@ def _fix_nginx_upload(ud):
if os.path.exists(nginx_conf_path):
# Make sure any duplicate entries are collapsed into one (otherwise,
# nginx won't start)
bkup_nginx_conf_path = "/tmp/cm/original_nginx.conf"
bkup_nginx_conf_path = "/opt/cloudman/boot/original_nginx.conf"
_run(log, "cp {0} {1}".format(nginx_conf_path, bkup_nginx_conf_path))
_run(log, "uniq {0} > {1}".format(bkup_nginx_conf_path, nginx_conf_path))
# Check if the directive is already defined
Expand Down
4 changes: 2 additions & 2 deletions cm_boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _key_exists_in_bucket(log, s3_conn, bucket_name, key_name):
logging.getLogger('boto').setLevel(logging.INFO)
LOCAL_PATH = os.getcwd()
CM_HOME = '/mnt/cm'
CM_BOOT_PATH = '/tmp/cm'
CM_BOOT_PATH = '/opt/cloudman/boot'
USER_DATA_FILE = 'userData.yaml'
SYSTEM_MESSAGES_FILE = '/mnt/cm/sysmsg.txt'
CM_REMOTE_FILENAME = 'cm.tar.gz'
Expand Down Expand Up @@ -280,7 +280,7 @@ def _fix_nginx_upload(ud):
nginx_conf_path = ud.get('nginx_conf_path', _nginx_conf_file(log))
log.info('Attempting to configure max_client_body_size in {0}'.format(nginx_conf_path))
if os.path.exists(nginx_conf_path):
bkup_nginx_conf_path = '/tmp/cm/original_nginx.conf'
bkup_nginx_conf_path = '/opt/cloudman/boot/original_nginx.conf'
_run(log, 'cp {0} {1}'.format(nginx_conf_path, bkup_nginx_conf_path))
_run(log, 'uniq {0} > {1}'.format(bkup_nginx_conf_path, nginx_conf_path))
already_defined = "grep 'client_max_body_size' {0}".format(nginx_conf_path)
Expand Down
2 changes: 1 addition & 1 deletion userData.yaml.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
access_key: <your AWS access key>
boot_script_name: [cm_boot.py]
boot_script_path: [/tmp/cm]
boot_script_path: [/opt/cloudman/boot]
bucket_cluster: cm-<hash>
bucket_default: [cloudman]
cloudman_home: /mnt/cm
Expand Down

0 comments on commit 49f535d

Please sign in to comment.