awslabs / aws-emr-launch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] - Docker runtime requirement preventing automated deployment via CodeBuild/CodePipeline

awsjputro opened this issue · comments

commented

Is your feature request related to a problem? Please describe.
The new version with the PythonLayerVersion of the CDK v2 requires docker runtime. This prevents me to automate the deployment of EMR resources via a deployment pipeline, such as using CodePipeline and CodeBuild. CodeBuild will fail and throw error:
"...Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
91 | jsii.errors.JavaScriptError:
92 | Error: docker exited with status 1..."

Describe the solution you'd like
Perhaps, using the manual bundling method used in the 1.x version.

Describe alternatives you've considered
None

Additional context
None

In order to use docker inside of CodeBuild you just need to enable Privileged mode. The docs for CodeBuild have a good example: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html

Depending on the version of the CodeBuild container image you use, it may also be necessary to add a PreBuild phase command that starts the docker daemon:

nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2 &

We use CodeBuild to deploy emr-launch for all of our regression tests and can confirm these steps do work.

commented

Thank you for the info and quick turn around.