-->

cap rubber:create_staging failed near end

2019-05-21 00:36发布

问题:

I am trying to deploy to AWS the sample Rubber test in the Quick Start wiki https://github.com/rubber/rubber/wiki/Quick-Start

I get past the part where it prompts for my local machine password to write to the hosts file ( it creates roles, the instance, and a lot of other things; I even got through another error where it was not connecting - I renamed the private key without the .pem extension and that fixed that ), and it runs on for a while, and gives an error here:

failed: "/bin/bash -l -c 'sudo -p '\''sudo password: '\'' bash -l -c '\''export DEBIAN_FRONTEND=noninteractive; apt-get -q -o Dpkg::Options::=--force-confold -y --force-yes install postfix build-essential git-core libxslt-dev ntp mysql-client libmysqlclient15-dev subversion curl autoconf bison ruby zlib1g-dev libssl-dev libreadline6-dev libxml2-dev libyaml-dev apache2 libapache2-mod-proxy-html libcurl4-openssl-dev libapache2-mod-xsendfile apache2-mpm-prefork apache2-prefork-dev collectd libperl-dev monit mysql-server percona-toolkit openjdk-7-jdk unzip python-django python-django-tagging python-cairo python-memcache memcached uwsgi uwsgi-plugin-python uwsgi-plugin-http sqlite3 bzr zip mongodb-10gen haproxy ec2-ami-tools'\'''" on production.foo.com

回答1:

I got the same failure, and looking just above that line at the output from the command, I saw that the uwsgi-plugin-http package needs to be replaced by the uwsgi-core package.

There apparently a pull request to fix this that has not yet been accepted, but you can fix it by making the same edit: on rubber 2.8.1, open config/rubber/rubber-graphite.yml, go to line 22, and it should look like this:

    packages: [python-django, python-django-tagging, python-cairo, python-memcache, memcached, uwsgi, uwsgi-plugin-python, uwsgi-plugin-http, sqlite3, bzr, zip]

Replace uwsgi-plugin-http with uwsgi-core so the line will be:

    packages: [python-django, python-django-tagging, python-cairo, python-memcache, memcached, uwsgi, uwsgi-plugin-python, uwsgi-core, sqlite3, bzr, zip]

Then, run cap rubber:bootstrap, and it should finish setting up your instance.