I have a node_modules cache in my Bibucket Pipeline and I added new module (eg yarn add react-modal) - how to make Bitbucket pipelines detect new yarn.lock and invalidate its cache?
Yeah, as Marecky have already mentioned, there is a ticket for that. Also, there is another one here https://jira.atlassian.com/browse/BCLOUD-17605, which should exactly address the issue. In short, there is an API to invalidate the cache, but it's currently reserved for internal use only.
Here is the official way to clear the caches
https://bitbucket.org/atlassian/bitbucket-clear-cache/src/master/
Related
I have access to a private Nexus Repository and would like to speed up my CI builds and thought that I could use the private repository to store and access my build cache. Is this a possibility or a dead end?
It works like a breeze.
Just create a "Raw" repository and give a user write permission for it.
This user then is used to fill the cache and you can use another user or anonymous access to read from the cache.
I just tried it minutes ago.
Any web server that supports PUT for storing files and GET for retrieving the same files should be fine with the default HttpBuildCache implementation.
You can even provide an own client-side implementation to use any remote service you want as build cache.
No.
Gradle's remote build cache is one of the selling points of Gradle Enterprise. So it's not something you can just "plugin" to another piece of software like Nexus.
There is however a Docker image that is designed to work with Gradle Enterprise. Maybe you could make use of that somehow.
But again, the remote build cache is a selling point of Gradle enterprise and as a result is designed to work with Gradle enterprise.
https://gradle.com/build-cache/
We have a infinispan cluster serving as cache server for our applications. Every time we need a new cache, we have to edit the config files, and redeploy the cluster, which is problematic. For obvious reasons, we don't want to redeploy the cache cluster.
We can add the new cache definition through web interface, or cli. But it has downside of not recording this configuration in a repo. Ideally I want to be able to add cache definitions in a way that is persistent in my code repo. So that in case of a disaster, I can simply redeploy the cache cluster.
We looked into creating cache definition through the source code, at application startup, but that doesn't seems to be possible.
Does anyone has an idea about the best practises for this issue?
After some R&D, this is what we found:
Programatic creation of the caches, are possible through jcache implementation in Infinispan, but we could not find a way to properly configure it. End result is just an empty cache definition, with no properties
What we ended up doing is to create caches using jboss cli. Use an script to create the cache definitions, and commit that script to version control system. This way you can recreate your cache server anytime by rerunning that script. The downside of this approach is that you are going to need to install jboss-cli on your deploying machine - CI probably- which is very inconvenient. We just decided to do this step manually for time being.
I'm fairly new to server administration. I have my Laravel app up and running and I want to make sure it has proper backups. I have researched some backup packages and I have settled on https://github.com/spatie/laravel-backup.
However, once the server fails, I need to know how to use the most recent backup (which will be on AWS S3) to restore the database on the rebuilt server. Are there any suggestions for guides on how to do this? I can't seem to find any unless it doesn't really require much learning and instead just a couple mySQL commands.
Thanks!
I would use replication and within Laravel i would try to switch connection to the replica database server so things can run smoothly until the problem is resolved.
Take a look at this Cross-Region Replication
A typical production environment is automatically running backups on most important things that your deployment needs in order to recover from a failure. Those parts would commonly be your database and storage folder, and configuration files.
Also when you deploy a laravel application there aren't many things that are "worth" backing up , you can choose the entire disk to be mirrored somewhere or you can schedule a backup script which run every N times and backups the things that are more important to your application.
Personally i wouldn't rely on an package from laravel to handle my backups , you can always use other backup utilities, replication and so on.
Update
Take a look at the link below:
User Guide » Amazon RDS DB Instance Lifecycle » Backing Up and Restoring
Backing Up and Restoring
You can call the API function RestoreDBInstanceFromDBSnapshot as showed on example.
But i don't think something automated exists that would auto restore or magically make everything work, you need to do a lot of security checks if something like that would even be attempted. Final word i believe a good solution manually entering or sending the request would be the most solid solution.
I made some changes to my origin server which now serves different data from same url.
I tried to clear my cache completely by doing the following invalidation in CF UI:
But this didn't work. How can I wipe off completely the Amazon CloudFront cache's in one go?
CloudFront does now support wildcard or full distribution invalidation. You will need do do one of the followng.
Invalidate each object that has changed
Invalidate /*
Version your objects so that they are considered new (Ie rename or querystring)
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidating-objects-console
You need to use /* instead of /.
Also, if you need to do this frequently, you can do it using the AWS CLI.
aws cloudfront create-invalidation --distribution-id=YOUR_DISTRIBUTION_ID --paths "/*"
Edit: thanks to #speckledcarp, you need to use "/*" (with quotes) when using the CLI.
According to AWS documentation you need to use /* instead of /
After i pull changes from development server to production server the styles and scripts are
not loading up in the html as shown below
I tried restarting the server and php service and cleared the caceh under /var/cache folder.
what i am guessing is its because of Cache, but i cannot disable cache under admin panel as all the scripts are not added to head.
how do i disable all cache in this scenario?
Please suggest.
If you have SSH access, go to var/cache/ and rm -rf. I wrote a php script to do exactly that, too, so my staff doesn't have to use SSH when an extension's developer tells us to "manually delete all the cache".
I think you can refresh the Cache in the Admin; dont have to disable, if you are not allowed.
Also, please clear the browser cache.
Three main caches, besides from any other 3rd party cache package you might have installed, its best practise to clear
var/cache
Magento Admin =>System->Cache Management(Refresh the cache based on your requirement).
Browser cache
Cheers,
Swapna
I have fixed the issue, i did the below things
1) Removed var/cache
2) Restarted my web server and php service
3) Disabled my compiler path through shell
and it worked just like that.