By using AWS re:Post, you agree to the Terms of Use
Questions in Developer Tools
Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

how to deploy an ecs service with a task definition that has 2 images with blue green deployment?

I had configured CodePipeline with CodeBuild and ECS blue green as an action provider to deploy my ECS service. In my buildspec.yml I created imageDetail.json like this ``` {"ImageURI": "imageid"}. ``` This setup was working fine when my task definition had only one image. Now my task definition has two images where one image depends from the other so I changed my buildspec.yml to create an imageDetail.json like this: ``` [{"ImageURI":"image1"}, {"ImageURI":"image2"}] ``` When configuring the pipeline with codebuild and ECS blue green deploy with this new task definition and imageDetail.json that has 2 images it is throwing the following error: "Exception while trying to parse the image URI file from the artifact: BuildArtifact." Then I tried doing this same setup but with ECS (rolling update) as an action provider instead of ECS blue green and it worked. With ECS (rolling update) as an action provider I needed to create an imagedefinitions.json instead of an imageDetail.json. The imagedefinitions.json created in buildspec.yml looks like this: ``` [{"name":"name1","imageUri":"image1"}, {"name":"name2","imageUri":"image2"}] ``` However, I want to use ECS blue green as an action provider where I need to create an imageDetail.json in the buildspec.yml file. So, can I create an imageDetail.json with two images like in imagedefinitions.json? I also made the same question here: https://stackoverflow.com/questions/73947923/how-to-deploy-an-ecs-service-with-a-task-definition-that-has-2-images-with-blue
0
answers
0
votes
12
views
asked 2 days ago

How to install playwright in elastic beanstalk via .ebextensions?

I need to install [Playwright](https://playwright.dev/docs/ci#introduction) in my Elastic beanstalk. So, I am using this command in `.ebextensions` `.ebextensions/01_install_playwright.config` ``` container_commands: install_playwright: command: "npx playwright install --with-deps chromium" ``` But it's getting error out. Here are the logs from cfn-init.log - ``` 2022-09-29 05:16:17,188 [INFO] -----------------------Starting build----------------------- 2022-09-29 05:16:17,194 [INFO] Running configSets: Infra-EmbeddedPostBuild 2022-09-29 05:16:17,197 [INFO] Running configSet Infra-EmbeddedPostBuild 2022-09-29 05:16:17,200 [INFO] Running config postbuild_0_test_worker 2022-09-29 05:16:18,246 [ERROR] Command install_playwright (npx playwright install --with-deps chromium) failed 2022-09-29 05:16:18,246 [ERROR] Error encountered during build of postbuild_0_test_worker: Command install_playwright 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 install_playwright failed 2022-09-29 05:16:18,247 [ERROR] -----------------------BUILD FAILED!------------------------ 2022-09-29 05:16:18,247 [ERROR] Unhandled exception during build: Command install_playwright 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 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 install_playwright failed ``` Am I missing something or any suggestion on how to run the npx command on .ebextensions. I also [posted on SO](https://stackoverflow.com/questions/73890683/how-to-install-playwright-dependency-in-elastic-beanstalk-ebextensions) but didn't see any response. While everything is working fine on code pipeline using buildspec.yml and same command ``` phases: install: runtime-versions: nodejs: 16 #nodejs: latest pre_build: commands: - echo Installing source NPM dependencies... - npm install - echo Installing Chromium... - npx playwright install --with-deps chromium ```
0
answers
0
votes
12
views
asked 6 days ago