2015-04-13 2 views
0

В настоящее время я пытаюсь развернуть приложение django на мой AWS эластичный бобовый стебель. Для этого я использую инструмент командной строки eb.Yum packages - где найти/проверить AMI

К сожалению, это не удается в YUM и требованиях.txt для pip.

Однако, я считаю, что есть лучший процесс, чем попытка Google узнать, что такое имя пакета. К сожалению, я не могу найти официальный репозиторий изображений Amazon image yum.

Как вы узнали названия пакетов?

Мой 100 LASTLOG:

------------------------------------- 
/var/log/eb-activity.log 
------------------------------------- 
     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup.py", line 13, in <module> 
      from setup_posix import get_config 
     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup_posix.py", line 2, in <module> 
      from ConfigParser import SafeConfigParser 
     ImportError: No module named 'ConfigParser' 
     Complete output from command python setup.py egg_info: 
     Traceback (most recent call last): 

     File "<string>", line 20, in <module> 

     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup.py", line 13, in <module> 

      from setup_posix import get_config 

     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup_posix.py", line 2, in <module> 

      from ConfigParser import SafeConfigParser 

     ImportError: No module named 'ConfigParser' 

     ---------------------------------------- 
     Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-9wom8lzp/MySQL-python 
    2015-04-13 05:17:35,549 ERROR Error installing dependencies: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 
    Traceback (most recent call last): 
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 34, in main 
     install_dependencies() 
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 29, in install_dependencies 
     check_call('%s install --use-mirrors -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True) 
    File "/usr/lib64/python2.7/subprocess.py", line 540, in check_call 
     raise CalledProcessError(retcode, cmd) 
    CalledProcessError: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError) 
caused by: Using base prefix '/usr' 
    New python executable in /opt/python/run/venv/bin/python3.4 
    Not overwriting existing python script /opt/python/run/venv/bin/python (you must use /opt/python/run/venv/bin/python3.4) 
    Installing setuptools, pip...done. 
    Running virtualenv with interpreter /usr/bin/python3.4 
    You are using pip version 6.0.8, however version 6.1.1 is available. 
    You should consider upgrading via the 'pip install --upgrade pip' command. 
    DEPRECATION: --use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested. 
    Collecting Django==1.7.4 (from -r /opt/python/ondeck/app/requirements.txt (line 1)) 
    Using cached Django-1.7.4-py2.py3-none-any.whl 
    Collecting MySQL-python==1.2.5 (from -r /opt/python/ondeck/app/requirements.txt (line 2)) 
    Using cached MySQL-python-1.2.5.zip 
     Traceback (most recent call last): 
     File "<string>", line 20, in <module> 
     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup.py", line 13, in <module> 
      from setup_posix import get_config 
     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup_posix.py", line 2, in <module> 
      from ConfigParser import SafeConfigParser 
     ImportError: No module named 'ConfigParser' 
     Complete output from command python setup.py egg_info: 
     Traceback (most recent call last): 

     File "<string>", line 20, in <module> 

     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup.py", line 13, in <module> 

      from setup_posix import get_config 

     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup_posix.py", line 2, in <module> 

      from ConfigParser import SafeConfigParser 

     ImportError: No module named 'ConfigParser' 

     ---------------------------------------- 
     Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-9wom8lzp/MySQL-python 
    2015-04-13 05:17:35,549 ERROR Error installing dependencies: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 
    Traceback (most recent call last): 
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 34, in main 
     install_dependencies() 
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 29, in install_dependencies 
     check_call('%s install --use-mirrors -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True) 
    File "/usr/lib64/python2.7/subprocess.py", line 540, in check_call 
     raise CalledProcessError(retcode, cmd) 
    CalledProcessError: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (Executor::NonZeroExitStatus) 


[2015-04-13T05:17:35.554Z] INFO [551] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/03deploy.py] : Activity failed. 
[2015-04-13T05:17:35.554Z] INFO [551] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook] : Activity failed. 
[2015-04-13T05:17:35.554Z] INFO [551] - [CMD-AppDeploy/AppDeployStage0] : Activity failed. 
[2015-04-13T05:17:35.555Z] INFO [551] - [CMD-AppDeploy] : Completed activity. Result: 
    Command CMD-AppDeploy failed. 
[2015-04-13T05:18:19.483Z] INFO [686] - [CMD-TailLogs] : Starting activity... 
[2015-04-13T05:18:19.700Z] INFO [686] - [CMD-TailLogs/AddonsBefore] : Starting activity... 
[2015-04-13T05:18:19.700Z] INFO [686] - [CMD-TailLogs/AddonsBefore] : Completed activity. 
[2015-04-13T05:18:19.700Z] INFO [686] - [CMD-TailLogs/TailLogs] : Starting activity... 
[2015-04-13T05:18:19.700Z] INFO [686] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity... 
[2015-04-13T05:18:19.876Z] INFO [686] - [CMD-TailLogs/TailLogs/TailLogs] : Completed activity. 
[2015-04-13T05:18:19.876Z] INFO [686] - [CMD-TailLogs/TailLogs] : Completed activity. Result: 
    Command CMD-TailLogs stage 0 completed. 
[2015-04-13T05:18:19.876Z] INFO [686] - [CMD-TailLogs/AddonsAfter] : Starting activity... 
[2015-04-13T05:18:19.876Z] INFO [686] - [CMD-TailLogs/AddonsAfter] : Completed activity. 
[2015-04-13T05:18:19.876Z] INFO [686] - [CMD-TailLogs] : Completed activity. Result: 
    Command CMD-TailLogs succeeded. 
[2015-04-13T05:20:07.311Z] INFO [715] - [CMD-TailLogs] : Starting activity... 
[2015-04-13T05:20:07.530Z] INFO [715] - [CMD-TailLogs/AddonsBefore] : Starting activity... 
[2015-04-13T05:20:07.530Z] INFO [715] - [CMD-TailLogs/AddonsBefore] : Completed activity. 
[2015-04-13T05:20:07.531Z] INFO [715] - [CMD-TailLogs/TailLogs] : Starting activity... 
[2015-04-13T05:20:07.531Z] INFO [715] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity... 



------------------------------------- 
/var/log/eb-commandprocessor.log 
------------------------------------- 
    You should consider upgrading via the 'pip install --upgrade pip' command. 
    DEPRECATION: --use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested. 
    Collecting Django==1.7.4 (from -r /opt/python/ondeck/app/requirements.txt (line 1)) 
    Using cached Django-1.7.4-py2.py3-none-any.whl 
    Collecting MySQL-python==1.2.5 (from -r /opt/python/ondeck/app/requirements.txt (line 2)) 
    Using cached MySQL-python-1.2.5.zip 
     Traceback (most recent call last): 
     File "<string>", line 20, in <module> 
     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup.py", line 13, in <module> 
      from setup_posix import get_config 
     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup_posix.py", line 2, in <module> 
      from ConfigParser import SafeConfigParser 
     ImportError: No module named 'ConfigParser' 
     Complete output from command python setup.py egg_info: 
     Traceback (most recent call last): 

     File "<string>", line 20, in <module> 

     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup.py", line 13, in <module> 

      from setup_posix import get_config 

     File "/tmp/pip-build-9wom8lzp/MySQL-python/setup_posix.py", line 2, in <module> 

      from ConfigParser import SafeConfigParser 

     ImportError: No module named 'ConfigParser' 

     ---------------------------------------- 
     Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-9wom8lzp/MySQL-python 
    2015-04-13 05:17:35,549 ERROR Error installing dependencies: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 
    Traceback (most recent call last): 
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 34, in main 
     install_dependencies() 
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 29, in install_dependencies 
     check_call('%s install --use-mirrors -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True) 
    File "/usr/lib64/python2.7/subprocess.py", line 540, in check_call 
     raise CalledProcessError(retcode, cmd) 
    CalledProcessError: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (Executor::NonZeroExitStatus) 


[2015-04-13T05:17:35.555Z] ERROR [551] : Command CMD-AppDeploy failed! 
[2015-04-13T05:17:35.555Z] INFO [551] : Command processor returning results: 
{"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"(TRUNCATED).../lib64/python2.7/subprocess.py\", line 540, in check_call\n raise CalledProcessError(retcode, cmd)\nCalledProcessError: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1. \nHook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI","returncode":1,"events":[{"msg":"Your requirements.txt is invalid. Snapshot your logs for details.","severity":"ERROR","timestamp":1428902255},{"msg":"Error installing dependencies: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1","severity":"SYSTEM","timestamp":1428902255}]}],"truncated":"true"} 
[2015-04-13T05:18:19.481Z] DEBUG [686] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties 
[2015-04-13T05:18:19.481Z] INFO [686] : Received command CMD-TailLogs: #<ElasticBeanstalk::CommandRequest:0x007f351dac2ae8> 
[2015-04-13T05:18:19.481Z] DEBUG [686] : Checking if the command processor should execute... 
[2015-04-13T05:18:19.482Z] DEBUG [686] : Checking whether the command is applicable to instance (i-59932798).. 
[2015-04-13T05:18:19.482Z] INFO [686] : Command is applicable to this instance (i-59932798).. 
[2015-04-13T05:18:19.482Z] DEBUG [686] : Checking if the received command stage is valid.. 
[2015-04-13T05:18:19.482Z] INFO [686] : No stage_num in command. Valid stage.. 
[2015-04-13T05:18:19.482Z] INFO [686] : Command processor should execute command. 
[2015-04-13T05:18:19.482Z] DEBUG [686] : Storing current stage.. 
[2015-04-13T05:18:19.482Z] DEBUG [686] : Stage_num does not exist. Not saving null stage. Returning.. 
[2015-04-13T05:18:19.483Z] INFO [686] : Executing command: CMD-TailLogs... 
[2015-04-13T05:18:19.483Z] DEBUG [686] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties 
[2015-04-13T05:18:19.483Z] DEBUG [686] : Refreshing metadata.. 
[2015-04-13T05:18:19.697Z] DEBUG [686] : Refreshed environment metadata. 
[2015-04-13T05:18:19.697Z] DEBUG [686] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands.. 
[2015-04-13T05:18:19.698Z] DEBUG [686] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands.. 
[2015-04-13T05:18:19.698Z] INFO [686] : Found enabled addons: ["logpublish"]. 
[2015-04-13T05:18:19.699Z] INFO [686] : Updating Command definition of addon logpublish. 
[2015-04-13T05:18:19.700Z] DEBUG [686] : Loaded definition of Command CMD-TailLogs. 
[2015-04-13T05:18:19.700Z] INFO [686] : Executing command CMD-TailLogs activities... 
[2015-04-13T05:18:19.700Z] DEBUG [686] : Setting environment variables.. 
[2015-04-13T05:18:19.700Z] INFO [686] : Running AddonsBefore for command CMD-TailLogs... 
[2015-04-13T05:18:19.700Z] DEBUG [686] : Running stages of Command CMD-TailLogs from stage 0 to stage 0... 
[2015-04-13T05:18:19.700Z] INFO [686] : Running stage 0 of command CMD-TailLogs... 
[2015-04-13T05:18:19.700Z] DEBUG [686] : Loaded 1 actions for stage 0. 
[2015-04-13T05:18:19.700Z] INFO [686] : Running 1 of 1 actions: TailLogs... 
[2015-04-13T05:18:19.876Z] INFO [686] : Running AddonsAfter for command CMD-TailLogs... 
[2015-04-13T05:18:19.876Z] INFO [686] : Command CMD-TailLogs succeeded! 
[2015-04-13T05:18:19.877Z] INFO [686] : Command processor returning results: 
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[{"msg":"[Instance: i-59932798] Successfully finished tailing 7 log(s)","severity":"INFO","timestamp":1428902299876}]}]} 
[2015-04-13T05:20:07.309Z] DEBUG [715] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties 
[2015-04-13T05:20:07.309Z] INFO [715] : Received command CMD-TailLogs: #<ElasticBeanstalk::CommandRequest:0x007f2b689eaad0> 
[2015-04-13T05:20:07.309Z] DEBUG [715] : Checking if the command processor should execute... 
[2015-04-13T05:20:07.310Z] DEBUG [715] : Checking whether the command is applicable to instance (i-59932798).. 
[2015-04-13T05:20:07.310Z] INFO [715] : Command is applicable to this instance (i-59932798).. 
[2015-04-13T05:20:07.310Z] DEBUG [715] : Checking if the received command stage is valid.. 
[2015-04-13T05:20:07.310Z] INFO [715] : No stage_num in command. Valid stage.. 
[2015-04-13T05:20:07.310Z] INFO [715] : Command processor should execute command. 
[2015-04-13T05:20:07.310Z] DEBUG [715] : Storing current stage.. 
[2015-04-13T05:20:07.311Z] DEBUG [715] : Stage_num does not exist. Not saving null stage. Returning.. 
[2015-04-13T05:20:07.311Z] INFO [715] : Executing command: CMD-TailLogs... 
[2015-04-13T05:20:07.311Z] DEBUG [715] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties 
[2015-04-13T05:20:07.311Z] DEBUG [715] : Refreshing metadata.. 
[2015-04-13T05:20:07.528Z] DEBUG [715] : Refreshed environment metadata. 
[2015-04-13T05:20:07.528Z] DEBUG [715] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands.. 
[2015-04-13T05:20:07.529Z] DEBUG [715] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands.. 
[2015-04-13T05:20:07.529Z] INFO [715] : Found enabled addons: ["logpublish"]. 
[2015-04-13T05:20:07.530Z] INFO [715] : Updating Command definition of addon logpublish. 
[2015-04-13T05:20:07.530Z] DEBUG [715] : Loaded definition of Command CMD-TailLogs. 
[2015-04-13T05:20:07.530Z] INFO [715] : Executing command CMD-TailLogs activities... 
[2015-04-13T05:20:07.530Z] DEBUG [715] : Setting environment variables.. 
[2015-04-13T05:20:07.530Z] INFO [715] : Running AddonsBefore for command CMD-TailLogs... 
[2015-04-13T05:20:07.530Z] DEBUG [715] : Running stages of Command CMD-TailLogs from stage 0 to stage 0... 
[2015-04-13T05:20:07.530Z] INFO [715] : Running stage 0 of command CMD-TailLogs... 
[2015-04-13T05:20:07.531Z] DEBUG [715] : Loaded 1 actions for stage 0. 
[2015-04-13T05:20:07.531Z] INFO [715] : Running 1 of 1 actions: 

TailLogs ...

То, что я на самом деле нужно установить (я из системы Debian):

libmysqlclient-dev libssl-dev libffi-dev python-dev 

и мой requriements.txt :

Django==1.7.4 
MySQL-python==1.2.5 
Pillow==2.7.0 
PyPDF2==1.24 
argparse==1.2.1 
cffi==0.8.6 
cryptography==0.7.2 
diff-match-patch==20121119 
django-braces==1.4.0 
django-cors-headers==1.0.0 
django-debug-toolbar==1.2.2 
django-import-export==0.2.6 
django-ipware==0.1.1 
django-summernote==0.6.3 
django-xsendfile==1.0 
enum34==1.0.4 
geoip2==2.1.0 
ipaddr==2.1.11 
maxminddb==1.1.1 
paypalrestsdk==1.8.0 
pyOpenSSL==0.14 
pyasn1==0.1.7 
pycparser==2.10 
pycrypto==2.6.1 
reportlab==3.1.44 
requests==2.5.1 
shortuuid==0.4.2 
six==1.9.0 
sqlparse==0.1.14 
suds==0.4 
tablib==0.10.0 
wsgiref==0.1.2 

ответ

0

C onfigParser был переименован в configparser в python3 (который вы используете выше).

Вы можете попробовать configparser2module использовать тот же конфигуратор в python2. Добавить его в requirements или делать pip install configparser2, а затем использовать что-то же просто, как:

try: 
    import configparser 
except ImportError as e: 
    import configparser2 as configparser 
Смежные вопросы