Upgrade django app to Linux-2 (AWS)
Budget: €30 – €250 EUR
I have an application (Django) running on AWS (Elastic Beanstalk, Docker). It is running on 'Docker running on 64bit Amazon Linux' platform which is now deprecated. I need to upgrade it to 'Docker running on 64bit Amazon Linux 2' but I have a problem with deployment.
I need somebody to fix the deployment. If needed, we can log in together to the AWS environment via a screen share.
Here are some logs
2022/08/30 07:26:00.363250 [INFO] Running command /bin/sh -c docker images | sed 1d
2022/08/30 07:26:00.439399 [INFO] aws_beanstalk/current-app latest 12b02a6a3048 10 seconds ago 902MB
python 2.7 68e7be49c28c 2 years ago 902MB
2022/08/30 07:26:00.439426 [INFO] save docker tag command: docker tag 12b02a6a3048 aws_beanstalk/current-app:latest
2022/08/30 07:26:00.439432 [INFO] save docker tag command: docker tag 68e7be49c28c python:2.7
2022/08/30 07:26:00.439444 [INFO] Running command /bin/sh -c docker rm `docker ps -aq`
2022/08/30 07:26:00.572797 [INFO] Error response from daemon: You cannot remove a running container fa2d39ee027d63477efa16801d52a7ee62651faf748170748b706c40e495986f. Stop the container before attempting removal or force remove
--- eb-engine.log ---
2022/08/30 07:26:00.572821 [INFO] Running command /bin/sh -c docker rmi `docker images -aq`
2022/08/30 07:26:00.689532 [INFO] Error response from daemon: conflict: unable to delete 12b02a6a3048 (cannot be forced) - image is being used by running container fa2d39ee027d
Error response from daemon: conflict: unable to delete 1d23cf9a4a46 (cannot be forced) - image has dependent child images
Error response from daemon: conflict: unable to delete a1baacc2260e (cannot be forced) - image has dependent child images
Error response from daemon: conflict: unable to delete 68e7be49c28c (cannot be forced) - image has dependent child images
--- cfn-init.log
2022-08-30 07:55:56,887 [INFO] -----------------------Starting build-----------------------
2022-08-30 07:55:56,894 [INFO] Running configSets: Infra-EmbeddedPreBuild
2022-08-30 07:55:56,896 [INFO] Running configSet Infra-EmbeddedPreBuild
2022-08-30 07:55:56,899 [INFO] Running config prebuild_0_DockerUpgrade_Test1
2022-08-30 07:55:56,904 [INFO] Command create_locations_dir succeeded
2022-08-30 07:55:57,005 [ERROR] Command make_scripts_executable (sudo chmod +x /var/app/current/scripts/*.sh) failed
2022-08-30 07:55:57,006 [INFO] ignoreErrors set to true, continuing build
2022-08-30 07:55:57,017 [ERROR] Command move_nginx_config (mv /tmp/elasticbeanstalk-nginx-docker-proxy.conf /etc/nginx/sites-enabled/elasticbeanstalk-nginx-docker-proxy.conf) failed
2022-08-30 07:55:57,017 [ERROR] Error encountered during build of prebuild_0_DockerUpgrade_Test1: Command move_nginx_config failed
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 576, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 276, in build
self._config.commands)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command move_nginx_config failed
2022-08-30 07:55:57,057 [ERROR] -----------------------BUILD FAILED!------------------------
2022-08-30 07:55:57,057 [ERROR] Unhandled exception during build: Command move_nginx_config failed
Traceback (most recent call last):
File "/opt/aws/bin/cfn-init", line 176, in <module>
worklog.build(metadata, configSets)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 137, in build
Contractor(metadata).build(configSets, self)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 564, in build
self.run_config(config, worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 576, in run_config
I need somebody to fix the deployment. If needed, we can log in together to the AWS environment via a screen share.
Here are some logs
2022/08/30 07:26:00.363250 [INFO] Running command /bin/sh -c docker images | sed 1d
2022/08/30 07:26:00.439399 [INFO] aws_beanstalk/current-app latest 12b02a6a3048 10 seconds ago 902MB
python 2.7 68e7be49c28c 2 years ago 902MB
2022/08/30 07:26:00.439426 [INFO] save docker tag command: docker tag 12b02a6a3048 aws_beanstalk/current-app:latest
2022/08/30 07:26:00.439432 [INFO] save docker tag command: docker tag 68e7be49c28c python:2.7
2022/08/30 07:26:00.439444 [INFO] Running command /bin/sh -c docker rm `docker ps -aq`
2022/08/30 07:26:00.572797 [INFO] Error response from daemon: You cannot remove a running container fa2d39ee027d63477efa16801d52a7ee62651faf748170748b706c40e495986f. Stop the container before attempting removal or force remove
--- eb-engine.log ---
2022/08/30 07:26:00.572821 [INFO] Running command /bin/sh -c docker rmi `docker images -aq`
2022/08/30 07:26:00.689532 [INFO] Error response from daemon: conflict: unable to delete 12b02a6a3048 (cannot be forced) - image is being used by running container fa2d39ee027d
Error response from daemon: conflict: unable to delete 1d23cf9a4a46 (cannot be forced) - image has dependent child images
Error response from daemon: conflict: unable to delete a1baacc2260e (cannot be forced) - image has dependent child images
Error response from daemon: conflict: unable to delete 68e7be49c28c (cannot be forced) - image has dependent child images
--- cfn-init.log
2022-08-30 07:55:56,887 [INFO] -----------------------Starting build-----------------------
2022-08-30 07:55:56,894 [INFO] Running configSets: Infra-EmbeddedPreBuild
2022-08-30 07:55:56,896 [INFO] Running configSet Infra-EmbeddedPreBuild
2022-08-30 07:55:56,899 [INFO] Running config prebuild_0_DockerUpgrade_Test1
2022-08-30 07:55:56,904 [INFO] Command create_locations_dir succeeded
2022-08-30 07:55:57,005 [ERROR] Command make_scripts_executable (sudo chmod +x /var/app/current/scripts/*.sh) failed
2022-08-30 07:55:57,006 [INFO] ignoreErrors set to true, continuing build
2022-08-30 07:55:57,017 [ERROR] Command move_nginx_config (mv /tmp/elasticbeanstalk-nginx-docker-proxy.conf /etc/nginx/sites-enabled/elasticbeanstalk-nginx-docker-proxy.conf) failed
2022-08-30 07:55:57,017 [ERROR] Error encountered during build of prebuild_0_DockerUpgrade_Test1: Command move_nginx_config failed
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 576, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 276, in build
self._config.commands)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command move_nginx_config failed
2022-08-30 07:55:57,057 [ERROR] -----------------------BUILD FAILED!------------------------
2022-08-30 07:55:57,057 [ERROR] Unhandled exception during build: Command move_nginx_config failed
Traceback (most recent call last):
File "/opt/aws/bin/cfn-init", line 176, in <module>
worklog.build(metadata, configSets)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 137, in build
Contractor(metadata).build(configSets, self)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 564, in build
self.run_config(config, worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 576, in run_config