Hi All, I am trying to deploy `wiremock` in `k8s` ...
# help
n
Hi All, I am trying to deploy
wiremock
in
k8s
environment and make it use redis to store the mappings so it can withstand pods going down or scaleout/scalein scenarios. What's the best way to approach this? Or any other recommended setup? Help is greatly appreciated 🙏
k
@Nalinda Karunaratna why don't you go for mounted volume to have shared space to store mappings instead of redis. It can withstand with auto scaling as well as what is needed here.
n
Thanks @Kapish Malik for your suggestion. In the cluster we use it won't allow us to create persistent volumes therefore I had to use different method to get this working.
k
@Nalinda Karunaratna I would suggest then keep your files on S3 or any other place and write startup script to fetch those files on startup in your containers. It will be better to do so because wiremock will soon be adding support for fetching files from external sources once that ll be done then you can remove this startup script all together. https://github.com/wiremock/wiremock/issues/2145
n
Thanks @Kapish Malik appreciate the suggestion. S3 sounds good but I am not sure how to make read/write automated? When wiremock users are adding new mappings it needs to write to the S3 etc. Perhaps I misunderstood your suggestion. Anyway let me know how to achieve this.
k
I also need to check what can be done at time of recording but if you are already aware of mappings you can prepare simulation before hand and put on S3.
n
I think that complicates a things a bit. The solution I am looking to implement is for large number of apps/services to utilise wiremock service for their integration/load testing requirements. These mapping will be very dynamic so it may or may not persists for long time. However I want to make sure when the wiremock scale it can scale with up to date mappings. Not sure whether I am on the correct path though. Appreciate your feedback.
k
If persistent volumes can be created then this will be sorted without any sort of hacks 🙂
👍 1