Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working E2E deployment #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Working E2E deployment #2

wants to merge 3 commits into from

Conversation

JohnPreston
Copy link
Member

No description provided.

@JohnPreston JohnPreston linked an issue Feb 28, 2024 that may be closed by this pull request
Copy link

gitguardian bot commented Feb 28, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9696068 Triggered Username Password 3185b93 aws.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@JohnPreston JohnPreston marked this pull request as ready for review February 28, 2024 21:21
@JohnPreston JohnPreston changed the title Working E2E deployment - 403 on wp-admin Working E2E deployment Feb 29, 2024
@aanno
Copy link

aanno commented Mar 1, 2024

Hm,

for me

ecs-compose-x up -f docker-compose.yml -f aws.yml -p wordpress-demo

on branch fix/2024-02+-update fails with

2024-03-01 07:55:23 [    INFO] Validating against input schema /stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/specs/compose-spec.json
2024-03-01 07:55:23 [    INFO] volumes.persistent - Mapped to wordpress
2024-03-01 07:55:23 [   ERROR] Failed to retrieve the image digest for public.ecr.aws/bitnami/wordpress:latest: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
2024-03-01 07:55:23 [ WARNING] services.wordpress: Failed to interpolate Docker image tag with digest
2024-03-01 07:55:23 [    INFO] services.wordpress - No Launch Type defined. Using default: FARGATE
2024-03-01 07:55:24 [    INFO] Service families to process ['wordpress']
Loaded x-acm acm acm /stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/acm
Loaded x-elbv2 elbv2 elbv2 /stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/elbv2
Loaded x-rds rds rds /stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/rds
Loaded x-route53 route53 route53 /stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/route53
Loaded x-s3 s3 s3 /stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/s3
Loaded x-sns sns sns /stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/sns
Loaded x-efs efs efs /stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/efs
2024-03-01 07:55:24 [    INFO] x-elbv2.wordpress-lb - Adding target wordpress:wordpress
2024-03-01 07:55:24 [    INFO] LB wordpress-lb only has a unique service. LB will be deployed with the service stack.
/stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/compose/x_resources/services_resources.py:216: DeprecationWarning: Services list will be deprecated in the next version. Use Services objects instead.
  warn(
2024-03-01 07:55:24 [    INFO] Processing x-acm
2024-03-01 07:55:24 [    INFO] x-acm.wordpress-demo - Lookup via Tags
Traceback (most recent call last):
  File "/stratis/home/tpasch/dev/venv/composex/bin/ecs-compose-x", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/cli.py", line 206, in main
    root_stack = generate_full_template(settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/ecs_composex.py", line 256, in generate_full_template
    add_x_resources(settings)
  File "/stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/ecs_composex.py", line 180, in add_x_resources
    x_stack = module.stack_class(
              ^^^^^^^^^^^^^^^^^^^
  File "/stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/acm/acm_stack.py", line 166, in __init__
    resolve_lookup(module.lookup_resources, settings, module)
  File "/stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/acm/acm_stack_helpers.py", line 62, in resolve_lookup
    resource.lookup_resource(
  File "/stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/compose/x_resources/__init__.py", line 269, in lookup_resource
    self.arn = find_aws_resource_arn_from_tags_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/common/aws.py", line 233, in find_aws_resource_arn_from_tags_api
    return handle_search_results(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/stratis/home/tpasch/dev/venv/composex/lib/python3.11/site-packages/ecs_composex/common/aws.py", line 172, in handle_search_results
    raise LookupError(
LookupError: ('No resources were found with the provided tags and information', None, 'acm:certificate')

@JohnPreston
Copy link
Member Author

JohnPreston commented Mar 1, 2024

@aanno yes, that's to be expected.
But probably then should have shouted it out in the README.

This presumes that you have a route53 hosted zone and a certificate in your AWS account ready to go to use to have HTTPs working properly.

If you do, there is the environment variable DOMAIN_NAME that you can change to your domain. But equally line 34 you should make sure to adapt the Tags to use to find an existing ACM certificate.

Do you reckon for the demo I should just scrap TLS? Or have one file that does the demo no TLS and the other one with? 🤔

EDIT: going one step farther, should I remove the DNS for the domain altogether and assume the user doesn't have a functional zone yet?

@aanno
Copy link

aanno commented Mar 4, 2024

Ah, I see. Some words in the README would make things more clear. And perhaps is possible to serve on http/80 only if no DOMAIN_NAME is given?!?

@JohnPreston
Copy link
Member Author

Ah, I see. Some words in the README would make things more clear. And perhaps is possible to serve on http/80 only if no DOMAIN_NAME is given?!?

Sounds like a plan. Will do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

s3.wp-data-bucket - Definition is not conform to schema.
2 participants