Skip to content
New issue

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

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

Already on GitHub? # to your account

bug: errors pushing to ECR on AWS build #134

Closed
qdzlug opened this issue May 3, 2022 · 2 comments
Closed

bug: errors pushing to ECR on AWS build #134

qdzlug opened this issue May 3, 2022 · 2 comments

Comments

@qdzlug
Copy link
Contributor

qdzlug commented May 3, 2022

Describe the bug
When running in AWS, the code fails with errors:

Previewing update (jaynew01)

View Live: https://app.pulumi.com/qdzlug/kic-image-push/jaynew01/previews/1672830f-f91d-49ac-81cd-18a90724ef90

     Type                               Name                                Plan       
 +   pulumi:pulumi:Stack                kic-image-push-jaynew01             create     
 +   └─ pulumi-python:dynamic:Resource  ingress-controller-repository-push  create     
 
Resources:
    + 2 to create

Updating (jaynew01)

View Live: https://app.pulumi.com/qdzlug/kic-image-push/jaynew01/updates/1

     Type                               Name                                Status      Info
 +   pulumi:pulumi:Stack                kic-image-push-jaynew01             created     7 messages
 +   └─ pulumi-python:dynamic:Resource  ingress-controller-repository-push  created     
 
Diagnostics:
  pulumi:pulumi:Stack (kic-image-push-jaynew01):
    /home/jschmidt/data/repos/kic-reference-architectures/pulumi/python/utility/kic-image-push/repository_push.py:83: RuntimeWarning: coroutine 'login_to_registry' was never awaited
      docker.login_to_registry(registry=registry, log_resource=self.resource)
    RuntimeWarning: Enable tracemalloc to get the object allocation traceback
    /home/jschmidt/data/repos/kic-reference-architectures/pulumi/python/utility/kic-image-push/repository_push.py:90: RuntimeWarning: coroutine 'tag_and_push_image' was never awaited
      docker.tag_and_push_image(repository_url=repository_url,
    RuntimeWarning: Enable tracemalloc to get the object allocation traceback
    info: Tagged and pushed image [nginx/nginx-ingress:2.2.0] to [369313531325.dkr.ecr.us-west-2.amazonaws.com/ingress-controller-jaynew01:2.2.0]
 
Outputs:
    ecr_repository: {
        ecr_image_id        : "sha256:5f3cd9092a9002e5d73af22ba1737ceb0ee491e457ad55e49ed6b0ddec8849a4"
        ecr_image_name      : "369313531325.dkr.ecr.us-west-2.amazonaws.com/ingress-controller-jaynew01:2.2.0"
        id                  : "7834ac50-3178-49e2-a918-dd6525b770d2"
        image_id            : "sha256:5f3cd9092a9002e5d73af22ba1737ceb0ee491e457ad55e49ed6b0ddec8849a4"
        image_name          : "nginx/nginx-ingress:2.2.0"
        image_tag           : "2.2.0"
        repository_password : [secret]
        repository_url      : "369313531325.dkr.ecr.us-west-2.amazonaws.com/ingress-controller-jaynew01"
        repository_username : [secret]
        urn                 : "urn:pulumi:jaynew01::kic-image-push::pulumi-python:dynamic:Resource::ingress-controller-repository-push"
    }

Resources:
    + 2 created

Duration: 4s

This leads to a failure when we try and deploy the IC; when we dig into this further we see that no image is actually pushed to the registry.

To Reproduce
Steps to reproduce the behavior:

Deploy MARA to AWS. This current happens consistently on the jaymistake02 branch; will be checking with main as well.

Expected behavior
Image should be pushed and then pulled by the IC deployment.

Your environment

  • n/a

Additional context
None

@qdzlug
Copy link
Contributor Author

qdzlug commented May 4, 2022

Work-around is to regress to 3.1.0 for pulumi-docker.

qdzlug pushed a commit to qdzlug/mara that referenced this issue May 4, 2022
qdzlug pushed a commit that referenced this issue May 5, 2022
* fix: remove erroneous dash in shebang

* fix: missing ''' in Jenkinsfiles

* fix: updated node label

* fix: documentation updates

* test: do change

* fix: update to createpw() function to stop Jenkins hang

* fix: update Jenkinsfiles

* test: add tracing to kube start

* test: more tracing

* test: update the createpw() function

* test: move the createpw logic

* test: move tr to sed

* test: still futzing with password generation

* test: zeroing in on PW fix

* fix: revert tests and apply fix for createpw()

* fix: issues with eks and 1.22, revert to 1.21 for eks

* chore: update nginx ic version and chart version

* fix: typo in configuration

* feat: update start script with new additions

* fix: add pulumi args to calls to pulumi to get stack

* fix: downgrade pulumi-docker to address ecr issue

* chore: remove post-run command block from jenkinsfiles

* chore: remove version info for ic from aws jenkinsfile

* chore: bump nginx ic version for repo deploy

* fix: version 5.2.0 moves to new api ver for auth

* fix: trying to find a working aws/eks pulumi combo

* fix: trying to find a working aws/eks pulumi combo

* fix: specify and lock all python modules

* fix: add stack identifier to call to application

* feat: add in information on versions in use

* fix: cleanup random temp file

* fix: move version info to AWS script for debugging

* test: working on kubectl version issue

* feat: add version information to start

* fix: address issue with curl command for kubectl

* test: trying new K8 version with older kubectl

* fix: cleaning up requirements.txt file

* fix: revert to 1.21

* feat: add call to pull K8 server information

* fix: clean up kubectl update section

* fix: adjust to work around #134
@qdzlug
Copy link
Contributor Author

qdzlug commented Aug 19, 2022

Closing; this has been fixed in the 1.1 release and will be further address when #167 merges.

@qdzlug qdzlug closed this as completed Aug 19, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant