argoCD not able to sync even after detecting changes - argocd

I’m trying to setup an argoCD application, with following syncPolicy
syncPolicy:
automated:
selfHeal: true
syncOptions:
- CreateNamespace=true
- Prune=false
- Replace=false
ArgoCD is able to detect new changes and I can see that in the UI, but its not syncing automatically - I need to manually click on sync button to sync it. Any idea where I’m going wrong. Thanks in advance.

Related

When using ArgoCD, any modification to initContainer do not update on the pod

I have a question regarding ArgoCD. When using argocd app sync to deploy our helm charts, we have a weird issue which we have to do this manually for changes to initContainers. The scenario is like this:
We make a change to a Deployment service to remove initContainer or edit the initContainer.
If we are to use helm upgrade --install, it works as intended; however, when using argocd app sync, the modifications do not occur on the pods that were updated.
The manual process is for me to go into the Deployment and remove the change of what was to occur.
I am sure this is a simple thing on my side but I would appreciate any feedback.

AWS copilot fails to create pipeline

I have a repo for all my docker stuff.
I would like to store copilot configs here as well, instead of adding a new copilot/ directory to the repo of every micro service.
As far as I know this should be possible.
So now I have one single copilot dir in a separate repo which looks like this:
copilot
.workspace
...
- some-service
- mainfest.yml
- other-service
- manifest.yml
etc. This works, I can add more services and I can deploy them.
However I tried to create a pipeline and that failed. According to the docs the pipeline should be able to handle multiple services, but I don't understand how.
I can run
copilot pipeline init
then I pushed the resulting files to my repo.
Then I tried:
copilot pipeline update
But this returns an error:
ACTION REQUIRED! Go to https://console.aws.amazon.com/codesuite/settings/connections to update the status of connection xy-user-service from PENDING to AVAILABLE.
✘ Failed to create a new pipeline: pipeline-myApp-user-service.
✘ create pipeline: check if changeset is empty: create change set copilot-51ef519a-711b-4126-bfbd-3d618ef824a5 for stack pipeline-myApp-user-service: ValidationError: Template format error: Unrecognized resource types: [AWS::CodeStarConnections::Connection]
status code: 400, request id: 8a87f62a-ae14-4fe3-9a3e-8b965d2af794: describe change set copilot-51ef519a-711b-4126-bfbd-3d618ef824a5 for stack pipeline-myApp-user-service: ValidationError: Stack [pipeline-myApp-user-service] does not exist
status code: 400, request id: 44927d7e-2514-466a-94ff-51e932042737
The xy-user-service connection didn't exist. The list of connections is empty. I tried to create it, linking my Bitbucket to AWS. But the error is still there..
What am I doing wrong?
Am I supposed to run copilot app init in the root dir of each and every micro service (they are in separate repos) and then should I create a separate pipeline for each?
Is it not possible to just store copilot configs in one place?
Thanks in advance!
It sounds like you have one repo with all of your configs, and separate repos for each service's source code.
If this is the case, the pipeline is not working because it needs the url to the source repo, not the repo with the config files; this is how it can detect changes to the source code that trigger the pipeline.
You CAN have multiple services in one Copilot app, but if you want a single pipeline for the entire app, the microservices' source code needs to be in one repository.
See:
https://aws.github.io/copilot-cli/docs/concepts/applications/
https://aws.github.io/copilot-cli/docs/concepts/services/
https://aws.github.io/copilot-cli/docs/concepts/pipelines/
(Cross-posted from https://github.com/aws/copilot-cli/issues/2109; we primarily use GitHub Issues for Q&As.)
Thanks so much!

AWS Amplify environment 'dev' not found

I'm working with AWS Amplify, specifically following this tutorial AWS-Hands-On-Tutorial.
I'm getting a build failure when I try to deploy the application.
So far I have tried creating multiple backend environments and connecting them with the frontend, hoping that this would alleviate the issue. The error message leads me to believe that the deploy is not set up to also detect the backend environment, despite that I have it set to do so.
Also, I have tried changing the environment that is set to deploy with the frontend by creating another develop branch to see if that is the issue.
I've had no success with trying any of these, the build continues to fail. I have also tried running the 'amplify env add' command as the error message states. I have not however tried "restoring its definition in your team-provider-info.json" as I'm not sure what that entails and can't find any information on it. Regardless, I would think creating a new environment would solve the potential issues there, and it didn't. Any help is appreciated.
Due to the documentation being out of date, I completed the steps below to resolve this issue:
Under Build Settings > Add package version override for Amplify CLI and leave it as 'latest'
When the tutorial advises to "update your front end branch to point to the backend environment you just created. Under the branch name, choose Edit...", where the tutorial advises to use 'dev' it actually had us setup 'staging', choose that instead.
Lastly, we need to setup a 'Service Role' under General. Select General > Edit > Create New Service Role > Select the default options and save the role, it should have a name of amplifyconsole-backend-role. Once the role is saved, you can go back to General > Edit > Select your role from the dropdown, if it doesn't show by default start typing it in.
After completing these steps, I was able to successfully redeploy my build and get it pushed to prod with authentication working. Hope it helps anyone who is running into this issue on Module 3 of the AWS Amplify Starter Tutorial!

Notify to refresh ember.js application after successful deployment on GitLab CI/CD

We are using the awesome Gitlab CI/CD workflow and had been satisfied with the process. A lot of Merge Requests could happen everyday and we want to make sure that our application is updated on realtime whenever our pipeline jobs is successful.
For instance our master branch could also be deployed on staging whenever Merge Request is accepted. Here is our example deploy_staging job on gitlab-ci.yml.
deploy_staging:
type: deploy
script:
- yarn install
- node_modules/ember-cli/bin/ember deploy staging --activate
environment:
name: staging
only:
- master
Since ember is a Single Page Application and once new deployment is shipped and available, ember couldn't recognized the new changes. Hence we need to refresh the page to be updated.
The other downside to this idea is, we can't afford to refresh the page if end user is in the middle of transaction. So my thought is to make a notification to refresh the page similar to any mobile app when updates are available they just go to the link and click the update manually.
Now this problem is narrowed down to this:
How can we sent signal to the running ember application so we can prompt a notification to refresh the page whenever updates are available (after successful CI/CD delivery)?
For this you'll want service workers :)
Service Workers are usually how most other sites notify about updates.
For ember, setting them up is fairly simple, we have ember-service-worker to get your caching and manifest going, and then we have ember-service-worke-update-notify for automatic notification of asset updates.
Though, there is a PR here: https://github.com/topaxi/ember-service-worker-update-notify/pull/3 to notify about updates in a more automated way -- the current way only notifies about an update upon refresh and load of cached assets.
I recently opened this PR, because I think with #pollingInterval={{5000}}, that would be the ideal interval to check for update, where every 5 seconds, we see if there is an update.
Hope this helps!

VSTS Yaml Build - App Center Service Endpoint could not be found

I'm trying to setup my build definition with YAML. I'm using the AppCenterDistribute task. It requires and endpoint to MS App Center. I've setup one as per this tutorial.
However, I got that error message:
"Step input serverEndpoint references endpoint Appcenter which could not be found. The service endpoint does not exist or has not been authorized for use."
This is exactly the same issue as this post although I've made sure that I AM in the correct VSTS project.
What could be the problem? I can't even run my build now.
Here's the YAML section:
variables:
APKName: 'com.project.this.apk'
- task: AppCenterDistribute#1
displayName: Deploy APK to App Center
inputs:
serverEndpoint: Appcenter
appSlug: 'Project/Learn'
appFile: '$(build.artifactstagingdirectory)\$(APKName)'
symbolsIncludeParentDirectory: false
releaseNotesInput: Notes
Note that I do have a normal VSTS web build (with a slightly different name) in the same VSTS project that does build and can distribute using the same endpoint to App Center.
Here's the error when I submit a YAML build:
I can also reproduce the issue when the App Center Distribute task is added in a YAML build definition.
And I also create an issue App Center Distribute task show errors when queuing YAML build for it. You can follow up.
You followed the App Center tutorial but you still have to create the Endpoint in VSTS which I think is what you're missing. It cannot be done through your Yaml.
To do so, connect to VSTS and start creating a new empty-process build definition MANUALLY for the SAME project. Add the the "App Center Distribute" task. There is a dropdown for the endpoint. It is empty and there is a "New" button to create one. Do so and give it the name that you use in your Yaml. Then you can cancel your build definition creation and use your Yaml.
UPDATE:
I replied too fast as you said you already have a build defintion working fine with your App Center endpoint. I still keep the above as it could help others.
However, when I compare your Yaml to mine, I notice that I use quotes while you don't. That may be the issue (also I may just have quotes because I have a space in my endpoint name and you don't).
serverEndpoint: 'App Center'
On your existing working build definition, did you try the "View Yaml" button on the top right corner? This gives you the corresponding yaml and it is very useful :-)