ukgovdatascience / databox

Infrastructure as a code for Data Science processing machine
MIT License
8 stars 8 forks source link

Deployment tasks when running a databox with a custom ami #24

Open ivyleavedtoadflax opened 6 years ago

ivyleavedtoadflax commented 6 years ago

When running ./databox.sh -a ami-dca37ea5 -r eu-west-1 -i p2.xlarge up the following error occurs, and deployment tasks (like formatting the EBS volume fails).


aws_instance.box (remote-exec): E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Error applying plan:

1 error(s) occurred:

* aws_instance.box: 1 error(s) occurred:

* Script exited with non-zero exit status: 100

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
The state file either has no outputs defined, or all the defined
outputs are empty. Please define an output in your configuration
with the `output` keyword and run `terraform refresh` for it to
become available. If you are using interpolation, please verify
the interpolated value is not empty. You can use the
`terraform console` command to assist.
SUDO password:
 [WARNING]: provided hosts list is empty, only localhost is available```
ivyleavedtoadflax commented 6 years ago

Also:


TASK [ensure docker registry is available]
********************************************************************************************************************************************************
fatal: [34.250.92.179]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Failed to auto-install python-apt. Error was: ‘E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)\nE: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?’“}``
ivyleavedtoadflax commented 6 years ago

This is resolved in #31 by allowing the user to specify custom playbooks.